Best way to translate 2 SINTS into 1 DINT? (Studio 5000) : r/PLC - Reddit In other words, Youd need to specify the element if you want to perform an operation on a single tag. The Logix program manual doesnt mention a need for it. Weve had a lot of questions about the different PLC Data Types & Data Structures over the last few months. I never did try the COP. memory. In summary, using the MOV command, the process will be INT->DINT->ethernet->DINT->INT The question is, will the bits of the last INT be the same as (and in the same order as) the bits of the original INT. When you use a MOV instruction, the value of the data is taken into consideration by the controller. Most basic instructions such as the XIC, XIO and OTE utilize BOOLs. If in CLGX you mov decimel 12 or binary 1100 into Local:7:O.Data then you will turn on Local:7:O.Data.02 and Local:7:O.Data.03. You can swap the two words, the bytes within the words, or both. 20122023, manualsdir.comAll rights reserved. INT is a 16 bit varibale. The float value will be sent out as two 16-bit integers. If the two SINTs are in an array ( RcvSINT [0], RcvSINT [1] ) then COP RcvSINT [0] DestINT 1 should do it. The remote controller will received some INT words via DH+ that I need to copy onto the Produced tags (which are DINT tags by definition) Once the tags have transferred across the ethernet, I need to copy the DINT words back onto INT words. The first is the integrity of the data coming over DH+. Join SolisPLC and get started with our free courses. Older processors such as the SLC-500 or PLC-5 used 16 . %%EOF
0000001736 00000 n
ElectronGuru - I just read this in an old Modicon Concept Help File and it may apply here also. 0000002673 00000 n
Overflows, caused by putting DINT values above 32767 into INT targets, shouldn't cause a fault but just an overflow result and setting of the error bit on the FAL instruction. hb```B " ((((b @6Ps-^HgW98D"WR7;2&l#Lsd&(E7G3acd@ Arrays are an important construct which allow the programmer to group multiple elements. That's why you can mix REAL and DINT and INT when you are using the MOV, because the controller takes care of the conversion for you. You may also have to reverse the word order, or even the byte order; this depends on how the Modbus interface is done. Note that as discussed above, the data types are listed in each row with the main tag being INT (or DINT) and the ones below being BOOLs. The Apple user's group magazine I worked for very long time ago used to feature in each edition a short program (like 5 to 10 lines) that utilized low-level math or system functions in an inventive way. Copying two integer values into one DINT