STRING_TO_REAL in Twin CAT version 2.11

tech007

Member
Join Date
Aug 2010
Location
London
Posts
25
Hello People,

I am creating one application using TwinCAT version 2.11.

In which, i am getting string data as output and my problem

is that i would like to use this values for controling loop of

the process.

So, my question is that how can convert data from STRING to REAL values ?

I tried STRING_TO_REAL but it didn't work.

I also tried with oscat but i have some problem to use function

for conversation of string.

Any suggestion and help would be great.

Thanks in Advance.
 
What kind of information is in the string. Are they measurement values of status information. If they are statusinformation then perhaps a better idea would be to add an INT as well (next to the string) which provides you with the information you need. A LREAL is a fractional value and can change every cycle.
 

Similar Topics

Hi all, I've got a bit of a need to convert an integer (and a real in another situation) to a string with a particular format. This seems possible...
Replies
11
Views
2,447
First all please forgive my poor English language proficiency. I already successfully setup a analog tag reading data form PLC. Then I want to...
Replies
1
Views
1,829
Some where on Rockwell Automation sample code section there is/was a function for Connected Component Workbench. This function takes a REAL number...
Replies
2
Views
1,658
Dear Sir, I try to write a function use SCL to read the string from a DB and convert it to real and transfer to another DB. But the simple...
Replies
34
Views
24,998
I have a string '+0022.345' that i am getting from the serial port the number will be positive or negative that i need to work with can someone...
Replies
5
Views
2,108
Back
Top Bottom