Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I lookup and display text based on a PLC numeric value?

Based on a numeric value I would like to display a line of text.
For example: PLC memory location value 1="ON", 2="OFF", 3="FAULTED" etc.
In some case I will have up to 16 different states.
Other Scada software I've used has done this easily with a simple lookup table.
How do I do this with Lookout? I cannot seem to find any easy way of doing this.

Thanks in advance for any advice on this.

Jeff
0 Kudos
Message 1 of 3
(3,216 Views)
You could define an expression and use a series of IF statements: if(plc_val=1,"on",if(plc_val=2,"off","fault")) etc.

It's not the most elegant way but it'll work.
0 Kudos
Message 2 of 3
(3,211 Views)
Using the above expression will work, another way would be to use a datatable for all of your items using a simple excel file. Create a symbolic link to the cursor (A1.Txt=On,A2.Txt=Off, etc.)

This would also allow you to redefine the tag for all items without the need to edit the expression.

The symbolic link would look kind of like: "DataTable.A" & MyState & ".txt"

Good Luck
Mike
Mike Crabtree - Lead Developer
Destek of Nevada, Inc. / Digital Telemetry Systems, Inc.
(866) 964-6948 / (760) 247-9512
0 Kudos
Message 3 of 3
(3,202 Views)