RSlogix5000 Need Help with tags

ammarmansoor

Member
Join Date
Oct 2008
Location
Houston
Posts
14
Local:1:0.Data[0] is 32 bits long and has output for my 4 DeviceNet Devices (8 bit each). My question is how do i separate them and put each device (8 bits) under one 8 bit array ? I tried doing alias for each bit but then RSlogix doesn't allow me to put it under an 8 bit array ? Any help would be appreciated.
 
Create a tag array that is of datatype SINT[4] to hold the four 8-bit output blocks. Use this in your program, whether with Aliases or directly.

At the end of your program that runs these devices, use a COP or CPS instruction to copy all four SINT elements into the 32-bit DINT tag in the 1756-DNB output.

moz-screenshot.jpg
 
Another option is to use DINT alignment when you automap the output data, so that each of your devices is mapped into a separate DINT tag in the 1756-DNB output image:

Local:1:O.Data[0] first device
Local:1:O.Data[1] second device
Local:1:O.Data[2] third device
Local:1:O.Data[3] fourth device

It "wastes" three of the four bytes in the DINT output tag for the 1756-DNB, but it makes the data mapping simpler and more consistent.
 
This is my approach

In my case ( see figure attached) I use 16 bits, but you can change it to 8 bits.
First create an UDT with four bytes inside, then use CPS to copy your data from devicenet scanner memory to your tag ( based on the UDT just created)
After the copy you can separate byte by byte with no problem.
It is in spanish.

devicenet.jpg
 
Another option is to use DINT alignment when you automap the output data, so that each of your devices is mapped into a separate DINT tag in the 1756-DNB output image:

Local:1:O.Data[0] first device
Local:1:O.Data[1] second device
Local:1:O.Data[2] third device
Local:1:O.Data[3] fourth device

It "wastes" three of the four bytes in the DINT output tag for the 1756-DNB, but it makes the data mapping simpler and more consistent.

I like the idea (not mine, I hasten to add), to map Devicenet nodes to TWO TIMES the devicenet node number, thus allowing 8 bytes per device.

Since the default DNB I/O mapping table is 123 DINTs long, then the highest node number that can be mapped this way is node 61.

Node address 62 is typically reserved for a KFD serial interface onto the network (no I/O to map for that), and Node address 63 is the defualt node address for software configurable nodes then there are no issues.

Makes it all easy knowing that DINT 46 in the arrays is the I/O for node 23 etc.

And if a particular node needs more than eight bytes, then simply don't use the next highest node address for a real device.
 
I've seen that used (offset = 2X node number) and it's not bad.

The problem is, what if you need more than 8 bytes?

I like this way. Offset = Node number. Extra DINTS start at 65. Use as needed. Yes, the mapping is a bit more work, but the vast majority fit in the 1 DINT. Document the exceptions.

If I have a network that is all Powerflex drives and I'm using data links, I'll lower the number of nodes, and start the "extra" DINTS area sooner because I will run out of memory before I run out of node addresses. I always assign in multiples of DINT.
 
One little followup: This sort of mapping technique stuff is almost completely eliminated by the DeviceNet Tag Generator tool.

It's not perfect, but it does save a lot of labor. If you have non-RA devices, it's just a good starting place.
 

Similar Topics

I have: 1734-AENTR processor RSLogix5000 version 20 I am working with a JSR and it is behaving in a way I did not expect and I am unable to...
Replies
3
Views
2,425
Hi Everybody, It is just a simple program but i still can't do it. Pls look into my attachment picture. I can key in the Preset value of...
Replies
2
Views
1,432
i need help with RsLogix5000 to translate this ladder diagram to structured text .
Replies
2
Views
1,311
Hi All, I am looking for some help, on writing a logic to control the Power output from a VFD using PID... I will appreciate your help...
Replies
3
Views
2,599
i need to pass a value stored in a tag to a timer as its preset value. how do i do something like this? this preset value will be the result of...
Replies
2
Views
1,972
Back
Top Bottom