We are using CC Systems CCPXS target device, So could anyone have any idea that how we can capture the interrupt of power failure to the target device.
Thanks and Regards,
Rajesh G
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I understand you correctly, you want to trap the event that power is lost to the device.
In general, you do this with what most people call a "first scan" bit or marker. The idea is that if you create a bit that is only true during the first scan, then it is only on right when the target is re-powered. By definition, if the power just came on, it must have been off
Some targets will include a status bit or marker specifically for this reason but it is very easy to create one. In ST you could do this:
VARxFirstSCan :BOOL :=TRUE; (* Initialize to True for 1st Scan *)END_VAR;IFxFirstSCanTHEN
Β Β (*PutStartupCodeHere*)
Β Β xFirstScan :=FALSE;END_IF;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello All,
We are using CC Systems CCPXS target device, So could anyone have any idea that how we can capture the interrupt of power failure to the target device.
Thanks and Regards,
Rajesh G
If I understand you correctly, you want to trap the event that power is lost to the device.
In general, you do this with what most people call a "first scan" bit or marker. The idea is that if you create a bit that is only true during the first scan, then it is only on right when the target is re-powered. By definition, if the power just came on, it must have been off
Some targets will include a status bit or marker specifically for this reason but it is very easy to create one. In ST you could do this:
is also a bit in the statuslist