Object Script - Mitsubishi Electric MELSEC-Q Series Manual

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

Advertisement

Base screen 30500
Script No.
30002
Comment
DocumentDisplayProcessOfLastPage
Data type
Unsigned BIN16
//Check the total number of document pages is not 0.
if([w:GD60082]!=0){
//Compare the current page number to the total number of document pages to see if the current page
number exceeds the total number.
if([w:GD60081]>[w:GD60082]){
//Set the last page to display.
[w:GD60081]=[w:GD60082];
}
}

5.6.3 Object script

Base screen 30500
Object
Script user ID
Data type
//Do not exceed the total number of the document pages.
if([u16:GD60081] >= [u16:GD60082]){
[u16:GD60081] = [u16:GD60082] - 1;
}
Window screen 30003
Object
Script user ID
Data type
//Obtain Today's Year & Month from Clock Data
[w:TMP950] = [w:GS650] & 0xF000; //Obtain Tenths Digit of "Last 2-Digits of Year" from Clock Data for Setting
[w:TMP960] = [w:TMP950] >> 12; //Decimal Alignment
[w:TMP968] = [w:TMP960] * 10;//BCD->BIN
[w:TMP951] = [w:GS650] & 0x0F00; //Obtain Ones Digit of "Last 2-Digits of Year" from Clock Data for Setting
[w:TMP961] = [w:TMP951] >> 8;//BCD->BIN
[w:TMP973] = 2000 + [w:TMP968] + [w:TMP961]; //Set Year to TMP973 as BIN
[w:GD63990] = [w:TMP973]; //Set Year
[w:TMP952] = [w:GS650] & 0x00F0; //Obtain Tenths Digit of Month from Clock Data for Setting
[w:TMP962] = [w:TMP952] >> 4; //Decimal Alignment
[w:TMP969] = [w:TMP962] * 10;//BCD->BIN
[w:TMP953] = [w:GS650] & 0x000F; //Obtain Ones Digit of Month from Clock Data for Setting
[w:TMP974] = [w:TMP969] + [w:TMP953]; //Set Month to TMP974 as BIN
[w:GD63991] = [w:TMP974]; //Set Month
[w:TMP954] = [w:GS651] & 0xF000; //Obtain Tenths Digit of "Last 2-Digits of Day" from Clock Data for Setting
[w:TMP963] = [w:TMP954] >> 12; //Decimal Alignment
[w:TMP970] = [w:TMP963] * 10;//BCD->BIN
[w:TMP955] = [w:GS651] & 0x0F00; //Obtain Ones Digit of "Last 2-Digits of Day" from Clock Data for Setting
[w:TMP964] = [w:TMP955] >> 8;//BCD->BIN
[w:TMP975] =[w:TMP970] + [w:TMP964]; //Set Day to TMP975 as BIN
[w:GD63992] = [w:TMP975]; //Set Day
[w:TMP956] = [w:GS651] & 0x00F0; //Obtain Tenths Digit of Hour from Clock Data for Setting
[w:TMP965] = [w:TMP956] >> 4; //Decimal Alignment
[w:TMP971] = [w:TMP965] * 10;//BCD->BIN
[w:TMP957] = [w:GS651] & 0x000F; //Obtain Ones Digit of Hour from Clock Data for Setting
[w:TMP976] = [w:TMP971] + [w:TMP957]; //Set Hour to TMP976 as BIN
[w:GD63993] = [w:TMP976]; //Set Hour
[w:TMP958] = [w:GS652] & 0xF000; //Obtain Tenths Digit of "Last 2-Digits of Minute" from Clock Data for Setting
[w:TMP966] = [w:TMP958] >> 12; //Decimal Alignment
[w:TMP972] = [w:TMP966] * 10;//BCD->BIN
Switch
1
Unsigned BIN16
Numerical Display
1
Unsigned BIN16
Script name
Trigger type
Object ID *1
Trigger type
Object ID *1
Trigger type
30/35
Script30002
Ordinary
20042
Device Writing
20018
Rise, GB40
BCN-P5999-0176-2a

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Qd77ms16

Table of Contents