Yet another easybuilder question

sparkie

Lifetime Supporting Member
Join Date
Nov 2014
Location
KS
Posts
1,139
So I'm copying an array of 16 bits from a productivity 2000 holding my alarms for a section of the system. What I would like to do now is to be able to read a single coil out of that value. I'm reading the 16 values with the 0x_multi_coils-<starting address>. How can I break this array down into individual bits without having to create a separate tag for each coil?
 
Don't know if I'm quite following what your asking for.

In easybuilder you can access each bit of the word as such

Local Word
Bits
LW_Bit 0 ~ 1150015
DDDDD:dd
DDDDD: address
dd: bit no. (00 ~ 15)

Cheers

Ken
 
Don't know if I'm quite following what your asking for.

In easybuilder you can access each bit of the word as such

Local Word
Bits
LW_Bit 0 ~ 1150015
DDDDD:dd
DDDDD: address
dd: bit no. (00 ~ 15)

Cheers

Ken

That is pretty much what I'm looking for, however I'm completely confused as to how to actually implement that. Could you give me a concrete example of how it would work with a tag name/type or a document that specified what things like:

DDDDD:dd
DDDDD: address

etc mean. I've seen that kind of notation when adding tags, but I have not been able to find any documentation that breaks down what it is and how to use it.

EDIT: looking at that, It seems that you are calling a Local Word LW and adding _Bit to that. So if I did a modbus read multiple coils on a tag named "Alarms" then it would read 16 coils into "Alarms" and I would access bit number four of Alarms using "Alarms_Bit 4" . Is this correct? Also what does the tilda (~) mean?
 
Last edited:
In the address dialog for bit objects you can see the pulldown for the PLC and just below the address. If a local hmi is selected for the PLC the address pulldown will let you select LB which is the local bit address memory space (each address is a specific bit). Select LW_Bit will allow access to the word memory space and access to a bit in the specified word. The bits in the word at LW100 can be accessed by LW_BIT100:dd, where dd is the bit address (00-15) [the tilde just means to]. The second bit would be LW_Bit100:01 and would be on if LW100 contains a 2.
This addressing scheme may not be available depending on the device that you have selected as the PLC. The Schneider modbus TCP/IP uses MW_Bit which IIRC is the same addressing scheme.

If you show how your "copying the array" it might make things a bit more clear. Usually once the bits are accessible in word for in the local machine you can address by the whole word or by word:bit

Cheers

Ken
 
I have a set of 16 sequential modbus addresses stored in my PLC. They are 17 ~ 32. The default read length is 16 bits in easybuilder from what I understand. Here is how I have the address set up in the addresses window:



I see how that there is the addresses pane on the left. It seems that now I need to set the address. Would this be someting like 17 ~ 32 ? Am I on the right track here?

Thanks again for the help man. I'm getting my butt handed to me.
 
The addresses you are referencing 17 ~ 32 are bits, You will need to have a tag for each "coil" as address 17 isn't an array bit a discrete bit. 18 ~ 32 should each have a tag as well.

In the event (alarm) log the type can be changed to bit and the address can be either the tag or the device & address (like you have set up in the address tag dialog) for each of the addresses 17~32 (You don't need to create a tag as you can set the dialog directly to the address, less work but less understandable)

Hope this helps

Ken
 
Okay, here is what I figured out for future reference.

Specific to P2000 processor: You assign your modbus addresses. The P2000 software will automatically fill the array with the next set of sequential modbus addresses when you give the first element of the array an address.

For the HMI:
When you make a tag in the addresses window of the generic modbus driver, each type of data (in this instance, 0x_multi_coil) has a set number of memory addresses. The HMI maps those memory address numbers to the corresponding memory space allocated to the 0x_multi_coil address space. You can then use the addresses pane in the left to have a graphical representation of the data.

In my case, I had a 16 bit array holding my alarm bits. The starting modbus address of this array is 17, and the address of the last element is 32. I wanted to use elements (bits) 2 and 9 of this array for my test. Here is how to address the bits. I used bitlamps in this example:



Notice that even though the array elements I wanted to use were 2 and 9, the corresponding addresses were 18 and 25. This is because that is what their modbus address was set up as on the PLC.

Thanks for the help Ken. You are the man.
 
The addresses you are referencing 17 ~ 32 are bits, You will need to have a tag for each "coil" as address 17 isn't an array bit a discrete bit. 18 ~ 32 should each have a tag as well.

In the event (alarm) log the type can be changed to bit and the address can be either the tag or the device & address (like you have set up in the address tag dialog) for each of the addresses 17~32 (You don't need to create a tag as you can set the dialog directly to the address, less work but less understandable)

Hope this helps

Ken

I see what you are talking about with using a tag for each coil. My problem with this would be read times. That is why I was wanting to read multiple coils at one time, as this is a serial connection. I'm not quite sure how the driver actually performs the reads. Would it be better to set up the Alarms as I have it now, and then set up a tag for each individual coil?
 
Don't think read times will be an issue, regularly run Modbus serial devices with 100+ words with no timing issues. It's good to keep it efficient but I wouldn't think that a 200ms delay for an alarm would be an issue anyway

Ken
 
Last edited:
Don't think read times will be an issue, regularly run Modbus serial devices with 100+ words with no timing issues. It's good to keep it efficient but I wouldn't think that a 200ms delay for an alarm would be an issue anyway

Ken

Good to know. I'm reading from a PLC, but the PLC is reading from 30 different modbus devices, which is the reason I'm trying to go for efficiency here. I will be easily reading several hundred words here.
 

Similar Topics

So, after adding a second PC, purchasing another server license and setting up to function as a redundant server for FTV SE, I think I've...
Replies
2
Views
2,149
Howdy, Summary Rank beginner here. I don't have anything more than [RSLogix Micro Starter Lite], so I am using that for it's editing...
Replies
23
Views
4,826
What software are you using or would recommend for drawing interlock, control and sequence diagrams? A full blown CAD feels over the top to me...
Replies
10
Views
3,209
Hey Folks. Once again. I have an issue with CCW on my laptop. This is getting old, really...... I like the software but... Seems like every time...
Replies
23
Views
7,170
This may very well be my last question. I'm not on to system alarming. Each station has its own set of alarms. What I have done is provide a list...
Replies
5
Views
2,383
Back
Top Bottom