Hi
II am receiving some INT values from a gateway. I have already byte swapped them ( SWPB ) to get the values to match what is being sent from the source device
Byte A and Byte B each represent a BCD value and I need to seperate each value and end up with 2 x DINTs
The data represents the date and time so i need to build a wallclock array to set the PLC time/date
I see the FRD instruction will convert BCD to INT and I am looking at maybe using BTD to seperate the BCD into 2 integers
Is there a slicker way of doing this?
I was thinking of BTD to get A and B, both in BCD, the FRD them to int move to DINT tags
I have 5 to do so maybe even an AOI would make sense
Thanks
II am receiving some INT values from a gateway. I have already byte swapped them ( SWPB ) to get the values to match what is being sent from the source device
Byte A and Byte B each represent a BCD value and I need to seperate each value and end up with 2 x DINTs
The data represents the date and time so i need to build a wallclock array to set the PLC time/date
I see the FRD instruction will convert BCD to INT and I am looking at maybe using BTD to seperate the BCD into 2 integers
Is there a slicker way of doing this?
I was thinking of BTD to get A and B, both in BCD, the FRD them to int move to DINT tags
I have 5 to do so maybe even an AOI would make sense
Thanks