2.13 PLC Short Data No.52~No.59
PLC short data No. 52~59 reserved for NC displays data:
plcContext→PLC_DATA_TOTAL_WORD-4 to PLC_DATA_TOTAL_WORD-1
plcSubContext→PLC_DATA_TOTAL_WORD-8 to PLC_DATA_TOTAL_WORD-5
That is: plcContext at plcData[56] to plcData[59]
plcContext at plcData[52] to plcData[55]
PLC example:
#define paShow_word_1 (para[56]) // show laser output word "V"
#define paShow_Value (para[57]) // show laser output value, unit 0.01V
void PLCAPI plcOpen(Status &sts , PlcBlock &plc , unsigned short *PlcData
,long *LongPlcData)
{
// show spindle da output char on screen //
paShow_word_1 = 'V' ;
}
void PLCAPI plcRun(Status &sts, PlcBlock &plc)
{
// show spindle da output value on screen //
paShow_Value = plc.spindleDaValue*1000/2047; //unit 0.01V
}