You should go to the OPC Foundation () they have all the detailed infromation that you need and lists of all the participating OPC vendors. Perhaps someone in this group can expand upon this if you have additional questions. For example DToS(54321) converts the single DINT to a series of concatenated ASCII characters ("5" & "4" & "3" & "2" & "1") SToD reverses the operation, converting a string (array of characters) into a single equivalent DINT. Viewing the array in "HEX" mode yields test_string.DATA = 16#54 test_string.DATA = 16#65 test_string.DATA = 16#73 test_string.DATA = 16#74 test_string.DATA = 16#69 test_string.DATA = 16#6e test_string.DATA = 16#67 and so forth The string functions mentioned previously convert a DINT to a string. For our example, assume the value of "test_string" is "Testing 1-2-3". Chose something else and you will see the corresponding representation. The default "style" for viewing this data is ASCII. Expand this array and you will see each character in the string. The data you are looking for is in "TestString.Data" which is an array of SINTs (SINT). ControlLogix string data is already in ASCII format. You must first create an string data type(If it is not already in string form) and copy your data into the SINT's then assign a length to the string. They are STOD (String to DINT) or DTOS (Dint to string. I did a quick Google search and although the available documentation is limited I did find some good information on one of my Linked-In groups. The string is a HEX ASCII string basically HEX ASCII is taking the nibbles of a Hex data packet and transmitting thing in Human Readable form.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |