Control Wave Micro / Bristol file type conversion ?

darkesha

Member
Join Date
Nov 2007
Location
Calgary
Posts
107
Any Bristol experts here, or anyone familiar with CWM environment ?

If I convert real into 2 integers in the plc (to N7:0 and N7:1) and send this to RTU, is there a way to convert this back into a floating point (REAL) ?

Can't find anything in Emerson's documentation.
 
I assume you have two 16-bit integers and and want to reconstruct the 32-bit real their bit pattern represents.

There is a mathematical approach, using bit-wise ANDs and floating-point DIVides and such, but I would look for ways to COPy the bits into the float, possibly with byte-swapping, to get the answer directly.

What is the make and model of the PLC that has the integers and needs to convert them to floating point?

What language is to be used?
 
Last edited:
The platform is Bristol line of RTUs - owned by Emerson. Software is Control Wave Micro. Language can be function block or structured text.
I might call their tech support to see if they have pre-canned solution like Schneider has:
https://www.se.com/in/en/faqs/FA243214/

And float would be split into 2 INT at the plc and sent over.
 
You want a data UNION in structured text cf. http://www.plctalk.net/qanda/showthread.php?t=119300 or https://help.codesys.com/webapp/_cds_datatype_union;product=codesys;version=3.5.12.0


So you will have summat like
Code:
TYPE ints_union_real:

UNION 
    two_ints : ARRAY[0..1] OF INT;
    one_real : LREAL;
END_UNION
END_TYPE

VAR
    i2r : ints_union_real;
    is_the_val : BOOL;
END_VAR;

[COLOR=blue][B](* replace this with read of one PLC INT into i2r.two_ints[0] *)[/B][/COLOR]

i2r.two_ints[0] := -2048;

[COLOR=blue][B](* replace this with read of other PLC INT into i2r.two_ints[1] *)[/B][/COLOR]

i2r.two_ints[1] := -16513;

[COLOR=Blue][B](* Boolean is_the_val will be true. *)[/B][/COLOR]

is_the_val := (-0.9998779296875 = i2r.ints_union_real.one_real);
It will be straightforward if the byte and word order are the same in the PLC and in the RTU, but you may need to fiddle with byte and word order, but that is the basic idea.

Cf. https://en.wikipedia.org/wiki/Singl...cision_binary_floating-point_format:_binary32
 
Thanks sir. It might be a good idea to set the test bench and see what is possible.
I do hope ST in CWM allows for much of that syntax.
 
What are you using to send the data? Maybe if you do the conversion in whatever you are using to transfer the data it would remove a layer of complication. I have done a similar task with Red Lion DSPs into a CWM from a PLC 5.

Otherwise as far as my memory serves there isn't a function for that built into the CWM. You could convert both integers into reals in the CWM and do the math to combine them?
 

Similar Topics

Hi Friends This is a continuation with more info I have got. Client wants to Visualize Data (No-Control access) from DCS having AW70 H90...
Replies
0
Views
1,324
Hi Friends. I have a need to Pull data from a DCS server to two different Remote Control Centers via Micro wave. What will be the best...
Replies
0
Views
1,456
Good day Forum Members I got a older Lincoln welder and hoping to make it work at our shop. Welder in question is the Lincoln Power Wave 455M...
Replies
4
Views
190
I'm installing an HMI for an existing RTU. I have a spare control wave I want to dump the program into to test it before I go to site, however...
Replies
0
Views
240
I am looking for someone that may have copy of ControlWave Designer or OpenBSI v5.9. I am looking to do some testing and from what I read there is...
Replies
0
Views
792
Back
Top Bottom