Jay Anthony

How do I display UNIT_BCD value from Omron PLC to Indusoft Scada

3 posts in this topic

HI Jay

Good Morning

My name is Paresh and need some help, I just came across the very old forum about BCD to Integer that you have replied, I have Similar Problems and can not find a proper way to workaround, I have some data stored in UNIT_BCD format in OMRON PLC and want to display exact same values (without converting) to Indusoft scada. The problem I cannot select data type to UNIT_BCD in Indusoft so I tried HexaDecimal, Decimal but it reads converted value from UNIT_BCD, Please help me , Let me know if you need any more details,Thanks

Share this post


Link to post
Share on other sites

Ha ha.  Yes problem of mixing software providers that don't understand proprietary data types. Your 3 options:

1) Use CX-Supervisor (or other Omron software like CX-Server OPC or CX-Server Lite) to correctly read the BCD format

2) Edit the PLC program, and convert all PLC variables to standard Integers

3) If its possible... Read as hex and then write conversion routines in Indusoft script that run every time a new value is read (yuck!)

BB

Share this post


Link to post
Share on other sites

@paresh

It is quite simple.  You just have to change the expression for the display (this is for display only, not entry):

Example:

I have put a value of 123 (BCD) in DM_Test0.  With my expression set to this:

5d4d85bbce746_IntFormat.jpg.70ad53ab76af

My display shows this:

5d4d85bb6f7de_Intresult.jpg.665b0901f726

291 is of course the integer value of 123 (HEX).  

If I change the expression to this:

5d4d85bc3b08c_HexBCDformat.jpg.eca253339

This tells the display to format the variable as if it was a hex value.  BCD is a subset of Hex, so it causes the display to change to this:

5d4d85baed050_BCDResult.jpg.95cf998652c5

And the BCD value is displayed properly.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now