New Questions: translated FBC length.
I've recently translated a furnace program from PLC5 to ControlLogix. Daba and RonJohn helped be figure out my broken FALs(due to indirect addressing in the original PLC5 version).
I think I'm 'this close' to finishing, but at top of Alarm Collection/Alarm Build I have a FBC that does not work:
Original PLC5 FBC:
Src B63:20 (my latched alarm bits)
Ref B63:260 (my reference alarm bits)
Res N120:40
Control R66:21 LEN 320
Results R66:24 LEN 320
On CLX FBC:
*initially PCE error, it looks like FBC on CLX must be DINTs (these ranges of bits are INTs)
SO I figured I'll copy INT to DINT, then FBC, Then DINTresult back to INT)Here are the rungs:
RUNG 0=
COP B63:20 to DINT_B63_LAT length20
&branch COP B63:260 to DINT_B63_REF length20
RUNG 1=(the clx fbc)
Src DINT_B63_LAT (rung0 dint copy of my latched alarm bits)
Ref DINT_B63_REF (rung0 dint copy of my reference alarm bits)
Res DINT_N120
Control R66:21 LEN 320
Results R66:24 LEN 320
RUNG 2=
then I FAL DINT_N120 to ints N120[40] length20 (*this works and they match, remainder of code continues).
Okay, finally the actual questions:
1. I presume the length is the number of bits in the source file. So on PLC5 length was "320," I must have been comparing 20 words of 16bit INTs (b63:20-b63:39) to another 20 words (b63:260-b63:279)?
2. Is the new one wrong because now I'm FBCing DINTs and thus need to double my control lengths to 640 (20 DINT words x 32 bits)?
Doing so major faulted the CLX. Fault pointed to 'pos or len at compare control r66. I switched them it back to 320 and it cleared.
3. I've fiddled with control, how do i change the length to 640 (if that is what is nec to ensure correct fbc)?
Thanks again folks,
~JamesL
I've recently translated a furnace program from PLC5 to ControlLogix. Daba and RonJohn helped be figure out my broken FALs(due to indirect addressing in the original PLC5 version).
I think I'm 'this close' to finishing, but at top of Alarm Collection/Alarm Build I have a FBC that does not work:
Original PLC5 FBC:
Src B63:20 (my latched alarm bits)
Ref B63:260 (my reference alarm bits)
Res N120:40
Control R66:21 LEN 320
Results R66:24 LEN 320
On CLX FBC:
*initially PCE error, it looks like FBC on CLX must be DINTs (these ranges of bits are INTs)
SO I figured I'll copy INT to DINT, then FBC, Then DINTresult back to INT)Here are the rungs:
RUNG 0=
COP B63:20 to DINT_B63_LAT length20
&branch COP B63:260 to DINT_B63_REF length20
RUNG 1=(the clx fbc)
Src DINT_B63_LAT (rung0 dint copy of my latched alarm bits)
Ref DINT_B63_REF (rung0 dint copy of my reference alarm bits)
Res DINT_N120
Control R66:21 LEN 320
Results R66:24 LEN 320
RUNG 2=
then I FAL DINT_N120 to ints N120[40] length20 (*this works and they match, remainder of code continues).
Okay, finally the actual questions:
1. I presume the length is the number of bits in the source file. So on PLC5 length was "320," I must have been comparing 20 words of 16bit INTs (b63:20-b63:39) to another 20 words (b63:260-b63:279)?
2. Is the new one wrong because now I'm FBCing DINTs and thus need to double my control lengths to 640 (20 DINT words x 32 bits)?
Doing so major faulted the CLX. Fault pointed to 'pos or len at compare control r66. I switched them it back to 320 and it cleared.
3. I've fiddled with control, how do i change the length to 640 (if that is what is nec to ensure correct fbc)?
Thanks again folks,
~JamesL
Last edited: