Twincat 2.0 Reat_To_String Conversion Problem

DamianInRochester

Lifetime Supporting Member
Join Date
Jan 2011
Location
Rochester NY
Posts
1,292
Ran across a problem with the TwinCAT Real_To_String conversion today.

I have found that if my real is 0.12345
it converts to '1.2345'

It also converts 1.2345 to'1.2345'

In other words, if it is less than one it appears to multiply the value by 10 prior to converting to a string.

Anyone seen or heard of this issue before?
 
In fact it is even worse.

It appears to treat everything less than one as if it were in Scientific Notation.

So 0.0123 also converts to '1.23'

Argh!!!
 

Similar Topics

I am using twincat 3 to send some strings over TCP/IP. Where the server is a sensor and my PLC is the client. I noticed that the sensor didnt...
Replies
2
Views
65
I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
7
Views
221
Hi! I am trying to run the 'SimpleSample' (https://infosys.beckhoff.com/content/1033/TF5100_TC3_NC_I/Resources/3438746891/.zip ) to understand the...
Replies
2
Views
106
I am developing a library in twincat and one of the function uses IID_ITcVnAccess_TcVnPoint2_DINT and the definition of this type is defined in...
Replies
0
Views
72
Sorry if this has been asked before, and apologies if this seems like a trivial issue, but I am new to Beckhoff and have been banging my head...
Replies
2
Views
152
Back
Top Bottom