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

Hello,

I have finally figured out what i am trying to accomplish and was wondering if you had a script code i could use.

I am getting string values represented in decimal but i need to convert them to ASCII.

For example one of my tags is returning a 114 which in ASCII is an r.

Issue is i don't want to type out a huge converter since my data is a array of 20 characters.

I want to pass my tag into a script for example and let it return a ASCII character so then i can just concatenate that.

Hello, I have finally figured out what i am trying to accomplish and was wondering if you had a script code i could use. I am getting string values represented in decimal but i need to convert them to ASCII. For example one of my tags is returning a 114 which in ASCII is an r. Issue is i don't want to type out a huge converter since my data is a array of 20 characters. I want to pass my tag into a script for example and let it return a ASCII character so then i can just concatenate that.

Hello

I new user to VTScada. Did you manage to display strings from Siemen PLC. How did you do it? I coun't find any definite answer for this question.

Kind regards

Hello I new user to VTScada. Did you manage to display strings from Siemen PLC. How did you do it? I coun't find any definite answer for this question. Kind regards

Not sure if your using Modbus to connect to your S7 or not. If you are please read on.

About a year ago I had the same issue with a Modbus Driver connection to a Schneider PLC. Never got a response in the forum but through Support + I was told this couldn't be done.

https://forum.trihedral.com/index.php?u=/topic/544/displaying-a-plc-s-ascii-text

Basically, when it comes to Modbus the I/O & Calculation Sting tag is just a Calculation String tag which doesn't do I/O. Disappointing as all the other SCADA packages I've used have a way of handling arrays of Modbus registers whose values represent ASCII text. I've even found this basic functionality in small HMI platforms.

Not sure if your using Modbus to connect to your S7 or not. If you are please read on. About a year ago I had the same issue with a Modbus Driver connection to a Schneider PLC. Never got a response in the forum but through Support + I was told this couldn't be done. [https://forum.trihedral.com/index.php?u=/topic/544/displaying-a-plc-s-ascii-text](https://forum.trihedral.com/index.php?u=/topic/544/displaying-a-plc-s-ascii-text) Basically, when it comes to Modbus the I/O & Calculation Sting tag is just a Calculation String tag which doesn't do I/O. Disappointing as all the other SCADA packages I've used have a way of handling arrays of Modbus registers whose values represent ASCII text. I've even found this basic functionality in small HMI platforms.
464
12
5
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