Mitsubishi Electric MELSEC-Q Series Manual page 31

Simple motion module
Hide thumbs Also See for MELSEC-Q Series:
Table of Contents

Advertisement

[w:TMP959] = [w:GS652] & 0x0F00; //Obtain Ones Digit of "Last 2-Digits of Minute" from Clock Data for Setting
[w:TMP967] = [w:TMP959] >> 8;//BCD->BIN
[w:TMP977] =[w:TMP972] + [w:TMP967]; //Set Minute to TMP977 as BIN
[w:GD63994] = [w:TMP977]; //Set Minute
[w:TMP993] = [w:GS652] & 0x00F0; //Obtain Tenths Digit of Second from Clock Data for Setting
[w:TMP995] = [w:TMP993] >> 4; //Decimal Alignment
[w:TMP996] = [w:TMP995] * 10;//BCD->BIN
[w:TMP994] = [w:GS652] & 0x000F; //Obtain Ones Digit of Second from Clock Data for Setting
[w:TMP978] = [w:TMP996] + [w:TMP994]; //Set Second to TMP978 as BIN
[w:GD63995] = [w:TMP978]; //Set Second
Object
Script user ID
Data type
//BIN -> BCD Conversion
[w:TMP979] = [w:GD63990] - 2000; //Last 2-Digits of Year
[w:TMP980] = (([w:TMP979] / 10) << 4) + ([w:TMP979] % 10);
[w:TMP981] = (([w:GD63991] / 10) << 4) + ([w:GD63991] % 10);
[w:TMP982] = (([w:GD63992] / 10) << 4) + ([w:GD63992] % 10);
[w:TMP983] = (([w:GD63993] / 10) << 4) + ([w:GD63993] % 10);
[w:TMP984] = (([w:GD63994] / 10) << 4) + ([w:GD63994] % 10);
[w:TMP985] = (([w:GD63995] / 10) << 4) + ([w:GD63995] % 10);
Object
Script user ID
Data type
//Year & Month Setting
[w:GS513] = ([w:TMP980] << 8) + [w:TMP981];
Object
Script user ID
Data type
//Date & Time Setting
[w:GS514] = ([w:TMP982] << 8) + [w:TMP983];
Object
Script user ID
Data type
//Minute & Second Setting
[w:GS515] = ([w:TMP984] << 8) + [w:TMP985];
Object
Script user ID
Data type
//Day of Week Setting
[w:TMP986] = [w:GD63990]; //Year (BIN)
[w:TMP987] = [w:GD63991]; //Month (BIN)
[w:TMP988] = [w:GD63992]; //Day (BIN)
if(([w:TMP987] == 1) || ([w:TMP987] == 2)){ //Correction Processing to Calculate January and February as
13th/14th Month
[w:TMP986] =[w:TMP986] - 1; //Subtract 1 from Year
[w:TMP987] =[w:TMP987] + 12; //Add 12 to Month
}
[w:TMP989] = [w:TMP986]/4; //Create Items Required for Zeller's Congruence
Numerical Display
2
Unsigned BIN16
Numerical Display
3
Unsigned BIN16
//Set Year & Month to Change Time Device
Numerical Display
4
Unsigned BIN16
//Set Date & Time to Change Time Device
Numerical Display
5
Unsigned BIN16
//Set Minute & Second to Change Time Device
Numerical Display
6
Unsigned BIN16
31/35
Object ID *1
Trigger type
//Year BIN -> BCD
//Month BIN -> BCD
//Day BIN -> BCD
//Hour BIN -> BCD
//Minute BIN -> BCD
//Second BIN -> BCD
Object ID *1
Trigger type
Object ID *1
Trigger type
Object ID *1
Trigger type
Object ID *1
Trigger type
20019
Ordinary
20020
Ordinary
20021
Ordinary
20022
Ordinary
20023
Ordinary
BCN-P5999-0176-2a

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Qd77ms16

Table of Contents