GuardPLC 1600 to SLC 5/05

agarb

Member
Join Date
May 2006
Location
USA
Posts
309
How can I take multiple bits and put them in a word?

I am trying to report status info to a SLC 5/05 via ethernet. I have a message in the SLC that is successfully reading a couple of words out of the GuardPLC. But I can't figure out how to get my status info into the words that are being read. When I called tech support, they said to use the PACK instruction to do this but it looks like PACK wants BYTES for inputs; not bits.

Suggestions?
 
I'm not really familiar with the GuardPLC 1600, but I understand that you are using function block programming? Of course, this would be a simple task with ladder logic.


What about this:

Assign each local status bit to a particular bit in the status message word.

First, clear the status message word.

Then, for each status bit that is true, add the binary place value of that bit (according to your bit assignment map) to your status message word.

Seems kinda clunky, and you'd either need to use an unsigned integer, or stay away from bit 16.
 
Last edited:
Guard PLC is only Function Block, no ladder and instruction set is very limited.
PACK instruction is the only one that I remember
 
Guard PLC is only Function Block, no ladder and instruction set is very limited.
PACK instruction is the only one that I remember


Surely it offers an ADD function?

Modicon Quantum function block language has a MOVE function that can transfer individual bit status as well as word data, but I don't know about addressing a bit that exists within a word structure. Don't know about the GuardPLC at all. Just throwing out an idea, for whatever it's worth.

Possibly not much, eh? ;)
 
Did you try pack? This is correct instruction

Yes, I tried PACK but it wouldn't let me make connections from status bits to the inputs of the PACK instruction. Maybe I was doing something wrong. I'll try again tomorrow.

Yeh, this would be trivial on a SLC or Logix but I can't find any mechanism to directly address a particular bit within a word of data.
 
Yes, I tried PACK but it wouldn't let me make connections from status bits to the inputs of the PACK instruction. Maybe I was doing something wrong. I'll try again tomorrow.

Yeh, this would be trivial on a SLC or Logix but I can't find any mechanism to directly address a particular bit within a word of data.


Adding the binary place values would certainly do that.

Bit 1 = 1
Bit 2 = 2
Bit 3 = 4
Bit 4 = 16
Bit 5 = 32
Bit 6 = 64

etc. etc. etc...
 

Similar Topics

Hi All, I am trying to create a new module to communicate with in my RSLogix program but it keeps failing and coming with "Error - couldn't...
Replies
3
Views
1,343
Hello, I am struggling with getting 1734 Point I/O's working with GuardPLC 1600. The 1734-AENT adapter connected to GPLC1600 via Ethernet has...
Replies
1
Views
1,689
Hi I am new to this so please be patient, I have programmed ControlLogix before and now require to program a SIL3 GuardPLC. Firstly I would like...
Replies
3
Views
2,196
Program logic and Configuration are lost and PLC reverts back to as shipped state of INVALID CONFIG if PLC is powered down longer than approx 3...
Replies
0
Views
1,784
Has anyone managed to communicate to a Inview display from a GuardPlc. Even through a intermediatary PLC. The Inviews are on ethernet network and...
Replies
1
Views
4,246
Back
Top Bottom