In Fernhill SCADA Tags represent the resources in the SCADA system. For example:
You use the Tag Window of the Configuration Tool to edit tags:
Tags are organized using folders, which is similar to the way files are organized in a file system. You can use folders to group together logically related tags. For example:
In this part of the Getting Started Guide you will use the Configuration Tool to:
You will create tags to monitor these signals from a pump:
Signal | Type | Description |
---|---|---|
PumpState | Digital | Whether the pump is running (TRUE) or stopped (FALSE). |
Current | Analog | The current consumption of the pump in Amps. |
When you create a new folder or new tag, a new name is automatically generated. For information on how to rename tags, and which characters are valid in tag names see Tag Window Tag Names.
This example will use an IEC 61131-3 Program Tag to simulate the pump operation.
When you create a new IEC 61131-3 Program, a default template is provided. Press CTRL-A to select all text in the program. Then press DEL to delete the default template. In the next step you will add the code to generate test data.
Var_Global (* These global variables will be the data source for the data point tags *) PumpRunning : BOOL; MotorCurrent : LREAL; End_Var Program Main VAR Timer : TON; RandomValue : WORD; End_Var (* Use a TON function block to trigger every 5 seconds... *) Timer( IN:=NOT Timer.Q, PT:=t#5s ); (* If the timer has elapsed... *) If Timer.Q Then (* Get a random value *) RandomValue := SysGetRandomWord(); (* Work out the new pump state *) If RandomValue < 16#8000 Then (* Pump stopped *) PumpRunning := FALSE; MotorCurrent := 0.0; Else (* Pump running *) PumpRunning := TRUE; MotorCurrent := 15.0 + TO_LREAL(RandomValue AND 16#FFF) / 4096.0; End_If End_If End_Program
This code should replace the default template provided when you created the IEC 61131-3 Program Tag.
If there are errors shown, go back to step 5 and check the code was pasted correctly.
Close the program code window.
Note: Make sure the Relative Reference field is checked.
In this example an IEC 61131-3 Program is the data source. In a real application the data source would be a PLC Device Tag or other type of data source.
Property | Value |
---|---|
TextState0 | Stopped |
TextState1 | Running |
The IODataSource property is reference property and allows one tag to refer to another tag. In Fernhill SCADA there are two types of reference value:
Property | Value |
---|---|
IODataSource | .IEC 61131-3 Program |
IOItemName | MotorCurrent |
IOItemType | 32-bit floating point |
Units | Amps |
When complete, the properties should look like:
Continue with Part 3: Introduction to Graphic Pages.
To learn about the Configuration Tool.
To learn about the editing tools in the Properties Window.
For the meaning of terms used in Fernhill SCADA.