SLC500 Converting integer to Ascii

I had to convert integers to Hex ASCII and xmit serially a few years ago. Heres the code--4 rungs to do one integer to four character ASCII Hex. I did it with a 5/20, but the same functions live in the SLC's, I'm pretty sure.
 
Hello again everybody :)

After discussing the issue converting floating point regs into double integer with AB, the answer is "Are you willing to pay for our engineers in the States to build a series of instructions that will do the job?" I must say, I'm not.

So the sollution to the problem is not to use the SLC, but Micrologix, which work with long integers.

After checking out the Micrologix, I learned that it is not possible to convert large numbers from floating point to long integers, as the floating point register is a rounded value. The floating point register is calculating large numbers into the numbers of the power of 2 to a one digit number followed by 6 decimals, i.e. 1.234568+E008.

Using the MOV instruction, converting a long integer value of 123456789 to floating point will return a value of 1.234568+E008. But so will all values from 123456748 - 1234567852. As is when the reverse action is performed.

Converting from Long integer to floating point and back will create the situation that the numbers from 12345648 to 123456756 all results in the same value of 123456752 in the distination long integer. As the source number increases the result value differs even more.

!!! When the source number reaches 2147483584 the result gets negative (-2147483648) and stays this value until maximum is reached in the source reg (2147483647).

If I where to use it to some positioning, well I wouldn't think of the consequences.

Thank you all very much - the problem seems solved - use another CPU.
 

Similar Topics

Hello, did anybody know, if there exist an converting cable like the1492-CM1746-M01 (for an 1746-IB16 to an 5069-IB16), for an 1746-HSCE to an...
Replies
3
Views
391
Hi, is there anyone experienced in converting shift registry(SR) his command to SLC ladder logic have been trying for some time but not...
Replies
0
Views
1,508
hi, i balan here, i am amids of converting a program from ps3 to slc, however to start i have a manual on it but it is in dutch language and i am...
Replies
20
Views
4,775
hi any out there have any information on converting seimens s5 to allen bradley slc500 as i am looking at converting these programs in our...
Replies
3
Views
4,648
I cannot add SLC500 analog input tag (I: 8.3) to EZSeries Touch Panel Editor (V 5.3). I used all the listed tag datatype but it all says "Invalid...
Replies
10
Views
259
Back
Top Bottom