43546members
218143posts

ClearSCADA 2017 - Move the value of one of two different tags based on discrete into a third tag

Highlighted
Ensign

ClearSCADA 2017 - Move the value of one of two different tags based on discrete into a third tag

So if the discrete tag is true display tag A is used, if false then display the value from tag B.

I know I could just use visibility with two objects on the screen but would like a third tag that would show the value, historical data and alarms from one or the other at all times.

6 REPLIES 6
Highlighted
Lieutenant

Re: ClearSCADA 2017 - Move the value of one of two different tags based on discrete into a third tag

Do you want to do this for existing history, or are you ok with just getting data from when you implement it?

 

Sounds like a job for a calculation point, but it won't backfill anything. For that you'd need to write some logic or something in one of the APIs.

Highlighted
Ensign

Re: ClearSCADA 2017 - Move the value of one of two different tags based on discrete into a third tag

That sounds complicated. 🙂 The PLC work is being done by others but it seems like you should be doing this in the PLC so the SCADA just has one tag.

 

My current understanding is that you would have an analog internal tag with level alarms and historical logging that would somehow be getting its value from one of two external analog I/O tags. They currently have two discrete tags to choose between two different analog tags or addresses. If discrete A is set then switch the analog internal tag to get its value from external analog tag A and then the same for another set of B tags. So the one analog internal tag displayed on the screen would have the alarms and historical data of the sensor in charge of the process.

 

I’ve not worked with ClearSCADA very often and wanted to see what the options were. Was there something like “calculation point” that you mentioned that would remap the data to a new internal tag or a way to change an external analog tags I/O address reliably on the fly?

 

Thanks for taking a look.

Highlighted
Lieutenant

Re: ClearSCADA 2017 - Move the value of one of two different tags based on discrete into a third tag

Yep, a calculation point is an internal database point that has an expression so you could have something like (psuedocode):

 

If (discrete)

then (analogX)

else (analogY)

 

You can configure it to be triggered by various means and it will add the data each time.

 

You can configure changing of the IO address on the fly, but I wouldn't recommend it. Dynamic config should be avoided for performance reasons - it has to be re-validated, re-added to the driver etc.

Highlighted
Sisko

Re: ClearSCADA 2017 - Move the value of one of two different tags based on discrete into a third tag

The syntax for the expression is:

IIF( ".test point.CurrentValue"=1,".pointWhenOne.CurrentValue",".pointWhenZero.CurrentValue")

Highlighted
Lieutenant

Re: ClearSCADA 2017 - Move the value of one of two different tags based on discrete into a third tag

Thanks for covering for my laziness Steve!

Highlighted
Commander

Re: ClearSCADA 2017 - Move the value of one of two different tags based on discrete into a third tag

I find laziness works sometimes.. I prefer allowing the default property to take over, this way the 'point' doesn't even need to be a point, it could also be a Variable, or a Parameter (and I haven't yet seen ClearSCADA get the default property wrong... although you'll get the bug report the instant I do Jesse 😛 )

 

IIF( ".test point", ".pointWhenTrue", ".pointWhenFalse" )


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..