how to transform variable coding on 2 INT type to 1 REAL t

RSLinx, RSLogix, RSView, LogixPro ...
ced1104
Posts: 3
Joined: Mon Jul 05, 2010 7:22 pm

how to transform variable coding on 2 INT type to 1 REAL t

Post by ced1104 »

Using the Applicom card to communicate with PLC, I need to transform a variable coding on 2 INT type to 1 REAL type

To communicate with PLC, I used a buffer composed by array of INT. I send a real variable to the applicom card using a frame coding on 16bits, but when I want a recover this variable coding 32bits with masks, I lost the floating comma type.

What can i do to recover the value of my variable into real type. You know if in Rslogix5000, a function exists to recover the state of my real variable
dehell
Posts: 104
Joined: Sat Jun 13, 2009 12:25 pm
Location: Europe

Re: how to transform variable coding on 2 INT type to 1 REA

Post by dehell »

Hi,
Try this code
http://plcforum.uz.ua//int_to_real.JPG
Regards
ced1104
Posts: 3
Joined: Mon Jul 05, 2010 7:22 pm

Re: how to transform variable coding on 2 INT type to 1 REA

Post by ced1104 »

Thanks your response I will try it
ced1104
Posts: 3
Joined: Mon Jul 05, 2010 7:22 pm

Re: how to transform variable coding on 2 INT type to 1 REA

Post by ced1104 »

The Applicom driver converts my real into 2 INT coding floatiing comma. I search a solution to recover the value of my real variable.