BCD to 2 ints, RS Logix 5000

cjd1965

Lifetime Supporting Member
Join Date
Apr 2007
Location
UK
Posts
1,659
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
 
Would this work? Im going to try tomorrow anyway but a heads up would be good
 
Thanks...beer and coding dont mix . What about the rest...look ok ?
 

Similar Topics

hi... i have an issue in s7 300 plc, while we run the machine(in idle there is no fault) , plc cpu goes in SF mode, after restart the power cycle...
Replies
2
Views
117
Hi. I’m doing a PV 1400e to PVP 7 migration and I don’t know how to convert the old 8digit BCD type from PB1400e into something that will work on...
Replies
2
Views
589
I'm working on converting an old PanelBuilder 1200 HMI application into FactoryTalk View ME. The PLC was an old SLC 5/02 with a scanner card for...
Replies
2
Views
1,104
I have a Cmore screen which is communicating to the DL06 in BCD and need to create a timer that works in real numbers for a test, I simply need to...
Replies
3
Views
2,139
Hello, I am stumped on how to tackle this issue. I am working on an Energy project on a solar / wind farm and I am trying to read in some data...
Replies
7
Views
2,475
Back
Top Bottom