REAL to ASCII

hmmmmmm.....i am facing an other problem now......can you tell me in FC30 how can i put a number bigger than 9.99999 in IN......... i want to put to IN number up to 100....... ex. 15.6 92.5 100.0 ....... but when i do this from 15.6 that i write it takes it 1.56 :(
 
If you type 15.6, the editor will convert this to 1.56e+001 when displaying the block. They are one and the same value.
 
You need to ensure that the exponential number matches what you want. You will always see the number in x.xxx format, the exponential shows the magnitude.


Some examples


1.0000+00 = 1.0
1.0000+01 = 10.0
1.0000+02 = 100.0
1.0000+03 = 1000.0

etc...
 
that works fine......... :D my new problem is that the ret_val appears also with x.xxx format but that does not help me because i want to display the ret_val to an ASCII led board and iwant to be the format of x.xx xx.xx xxx.xx :S any ideas? thanks again for helping me
 
Last edited:
You need to specify the functionality you require (ideally in the initial post) instead of revealing more of the functionality over a series of posts.
 
i see...ok...i want to display on a led ascii screen the efficiensy of a product line... and i want to display it like 100% , 96.55% ,3.52% . the RET_VAL is the value that has to appear on my led screen
 
How many characters are in the string you require ? what about leading zeros ?

e.g.
A real value of 0.0 Returns
Char[1]='0'
Char[2]='0'
Char[3]='0'
Char[4]='.'
Char[5]='0'
Char[6]='0'

or

0.0 Returns
Char[1]=' '
Char[2]=' '
Char[3]='0'
Char[4]='.'
Char[5]='0'
Char[6]='0'
 

Similar Topics

Hello all, We need to convert ASCII data into Real Raw data, here we use Trimble GPS and need to get the position data. We use SCADAPack 357...
Replies
4
Views
2,843
I have a SINT[500] array that is pulling data from a scale. The maximum number of characters that can be sent by the scale is 6, and there are two...
Replies
7
Views
1,607
Dear Experts. I have a CPU 315-2dp Siemens PLC which is communication between mistubishi fX-3U Series mistubishi is giving me AScii String data...
Replies
2
Views
5,945
Hi guys I have a big work cell that has 2 turntables and 4 fixtures, we have the Alpha signs(like you see in the restaurants the scrolling ones)...
Replies
8
Views
6,495
Has anyone had any experience or written any code to convert a real (F file) to an ASCII (ST file) for a AB SLC/Micro, in this case I am using a...
Replies
13
Views
6,935
Back
Top Bottom