Support Forums
STRING I/O

I am working with a Siemens S7 TIA Portal program and I am trying to pull the part type from the PLC into the VTSCADA system. The issue I am having with the String I\O is I am only getting the DEC form of the tag and not the CHARACTER values. In the PLC in a watch table when I look at the exact tag in DEC I get the value of 2565 but in CHAR I get DB 10 (FW part type). is there something I can do to read the characters or some way of converting the DEC to String?

I am working with a Siemens S7 TIA Portal program and I am trying to pull the part type from the PLC into the VTSCADA system. The issue I am having with the String I\O is I am only getting the DEC form of the tag and not the CHARACTER values. In the PLC in a watch table when I look at the exact tag in DEC I get the value of 2565 but in CHAR I get DB 10 (FW part type). is there something I can do to read the characters or some way of converting the DEC to String?

Hey Brandon,

I'm having a bit of trouble understanding exactly where you're having issues here. From what I read, you are trying to read a string value from your PLC into VTScada. If you reference the PLC watch table you can see 2565 as the decimal value for the register and is you watch register DB 10 as a CHAR you get the part type (FW)?

Can you confirm that you can read the register as a numeric value in VTScada? Does that value align with what you would expect? If not, it is likely that you need to read more bytes (ie: the adjacent register as well).

Can you also confirm your expected string output? I'm having a bit of trouble figuring out what you're expecting 2565 to resolve to. A bit more details on what you are seeing and what you are expecting would be helpful.

You should be able to read the string directly from the PLC though we can do something to modify it in the software in the case this does not work for some reason.

Hey Brandon, I'm having a bit of trouble understanding exactly where you're having issues here. From what I read, you are trying to read a string value from your PLC into VTScada. If you reference the PLC watch table you can see 2565 as the decimal value for the register and is you watch register DB 10 as a CHAR you get the part type (FW)? Can you confirm that you can read the register as a numeric value in VTScada? Does that value align with what you would expect? If not, it is likely that you need to read more bytes (ie: the adjacent register as well). Can you also confirm your expected string output? I'm having a bit of trouble figuring out what you're expecting 2565 to resolve to. A bit more details on what you are seeing and what you are expecting would be helpful. You should be able to read the string directly from the PLC though we can do something to modify it in the software in the case this does not work for some reason.

Trihedral Engineering Ltd.

VTScada is reading the numeric value. I am not getting the string output I am needing when I put it on a page. I am expecting to see DB 10 but instead when I draw text I am seeing 2565 instead.

I'm expecting to see letters and numbers.

VTScada is reading the numeric value. I am not getting the string output I am needing when I put it on a page. I am expecting to see DB 10 but instead when I draw text I am seeing 2565 instead. I'm expecting to see letters and numbers.

Sorry Brandon, when I last looked at this I got stuck trying to figure out how to represent DB 10 as 2565. I'm still not really sure how the bits or hex would look on this. I still don't think I quite understand how this conversion is supposed to work. Can you try something like https://www.branah.com/ascii-converter describe how "DB 10" is represented by 2565 or try again to tell me what portion of this I am missing? It feels almost like you might be using discrete values to designate text (which is something you can do in VTScada).

Sorry Brandon, when I last looked at this I got stuck trying to figure out how to represent DB 10 as 2565. I'm still not really sure how the bits or hex would look on this. I still don't think I quite understand how this conversion is supposed to work. Can you try something like https://www.branah.com/ascii-converter describe how "DB 10" is represented by 2565 or try again to tell me what portion of this I am missing? It feels almost like you might be using discrete values to designate text (which is something you can do in VTScada).

Trihedral Engineering Ltd.

When viewing a string in VTSCADA I am getting a numeric value instead of characters.
5d653f22ea074
5d653f22ed813

When viewing a string in VTSCADA I am getting a numeric value instead of characters. ![5d653f22ea074](serve/attachment&path=5d653f22ea074) ![5d653f22ed813](serve/attachment&path=5d653f22ed813)

Bottom is the string that I am reading from the PLC live via the Siemens TIA Portal Version 15

Bottom is the string that I am reading from the PLC live via the Siemens TIA Portal Version 15

The string IO tag is designed to bring in a n ASCII string data type from the device. As the Rockwell Compactlogix/Controllogix have a string data type as do JSON and SNMP. It does not parse a character values and turn them into strings. I don't think that the S7 has a string data type.

The data type you are reading is a word. You would have to bring that into VTScada with an analog status tag and use script code to convert it to ASCII.

The string IO tag is designed to bring in a n ASCII string data type from the device. As the Rockwell Compactlogix/Controllogix have a string data type as do JSON and SNMP. It does not parse a character values and turn them into strings. I don't think that the S7 has a string data type. The data type you are reading is a word. You would have to bring that into VTScada with an analog status tag and use script code to convert it to ASCII.

Doug Spurrell

88
8
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft