Need help converting 1 32-bit float to 2 16-bit integers

jshrocks7

Member
Join Date
Aug 2006
Location
Wenatchee, WA
Posts
9
I need help converting from a floating register to two integer words. I'm using a SLC 5/05 and need to be able to write 32 bit data to a servo drive from a floating point register. Thanks for any sugestions.
 
If your 32 bit data conforms to IEEE 754 floating point standards then a simple COP instruction will do the trick. COP copies bit for bit preserving the original data while MOV performs a data type conversion.

Do a search on this forum for threads dealing with floating point numbers. Also check the knowledgebase at www.ab.com for articles and sample programs on how to work with floating point numbers.
 

Similar Topics

Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
318
Hello, I need some help with a rsp file. I cannot open it, because we have RSLogix 5000, but not RSLogix 5. I don't want to attach the file...
Replies
2
Views
2,863
need your help, please.. i wanna know, how an ADC can represent a value of a sensor...? please tell me with this condition, if i have a sensor...
Replies
4
Views
4,281
Hi, I’m new to the world of RSLogix and could use some help converting two RSS files to PDF. I was sent the files with very little information...
Replies
4
Views
3,944
Do any of you Excel gurus know of a VB code or function that will convert ASCII text into it's decimal equivalent? I'm not VB savy at all. I...
Replies
3
Views
5,830
Back
Top Bottom