Logix 5000: SINT and DINT

Iner

Member
Join Date
Mar 2010
Location
France
Posts
190
Hello,

I am new to Rockwell software and there is something I don't get. I understand that there is no logical adress and that Tags only have names.

My problem is that I send and receive SINT (1 byte) outputs by Ethernet IP.

I have a DINT data to send? How to write and subdivize this DINT into SINT OUTPUTs?

DINT and SINT data are only subdivized in bool when I want to create an alias. So I can't create 4 SINT from the DINT and then transfer them into output SINT.

With logical adresses like in Siemens, it would be very easy MD100=MW100+MW102=MB100+MB101+MB102+MB103.

There is always 2 words in a DINT, 4 bytes in a DINT and 32bits and you can easily access data.

How to do the same thing with Logix 5000?
 
Dint.0 = Bit 0, Dint.1 = Bit 1, etc...
Why not use SINT they are available in RS5000 when create your tag just select SINT in Data Type.

The Default Data Type of Tags is set to DINT but this can be changed. Select TOOLS > OPTIONS > Tag Editor Display
there you will see Default Data Type.
 
cwal61>> SINT are very small, can only go up to 127, which is not enough for values such as positions, speed and a lot of other things.

rbouws, thanks for the tip. It seems space costly (4 instructions for a DINT) but it will work.
 
I believe you could Use COP
Make your SINT an Array SINT[3] this will give you 4 SINT ARRAY 0-3
THEN COP DINT to SINT[0]
 
The default data element in ControlLogix is 32 bits, so when you create a SINT or INT type tag, internally ControlLogix stores it in a 32-bit location. Don't worry about "memory cost" until you have very large arrays.

Cwal61 has one typo; a SINT[4] has elements [0] through [3].

He's exactly right about the data handling method; use the COP command.

I do this frequently with third party devices that have a SINT datatype.

Read up on how the COP instruction Length parameter works.

When you COP a single DINT into an array of four SINT elements, all four bytes from the DINT go into the four DINTs.

COP
Source: DINTTagName
Destination: SINTTagName[0]
Length: 4
 
I am sending data to a robot by ethernet. The input/output are set as SINT and I can't change it. I can just change the number of byte (lowest is 16). I want to send the content of a DINT.

Robot:O:Output is a SINT[16] (array)

cwal61, COP DINT will fill SINT[1], [2] , [3] as well? If so, that's perfect.
 

Similar Topics

Hello i have been trying to figure out a good way to take hex and convert it to an array of SINT[]. Here is what my failed attempt looks like.
Replies
5
Views
1,318
I have am programming a Controllogix PLC. I have an Anybus AB7007 Communicator talking Modus RTU to a temperature controller. The tags it is...
Replies
14
Views
17,083
In RS Logix 5000, If I have a INT word (16#1234) how do I look at just the upper 8 bits (16#12) or just the lower 8 bits (16#34)? Thank you
Replies
3
Views
10,028
Can anyone explain to me what Sint,Int,Dint data types represent? or what they mean? I was watching one of the Ab's "How Do I" "Reference a tag in...
Replies
10
Views
56,619
Back
Top Bottom