- 30 Jan 2024
- Print
- PDF
Read and Write Data
- Updated on 30 Jan 2024
- Print
- PDF
GD(tagnumber)
Get data for input tag “tagnumber”.
Syntax: result = GD(tagnumber)
Remarks: GD returns the current value for the input tag in location “tagnumber”.
Example: This example gets the current value for Input tag number 9.
Result = GD(9)
Tag(tagnumber, writevalue,datetime)
Write data to output tag “tagnumber”.
Syntax: Tag(tagnumber, writevalue,optional datetime)
Remarks: This function writes the value “writevalue” as the current value of the output tag in location “tagnumber”. It defaults to writing that value with a timestamp equal to current time. An optional third parameter allows the user to set a specific timestamp to write out data, which should be a time equal to current time or in the past, not a future point.
Example: This example sets the current value for the output tag in location 9 to 30.5.
Tag(9, 30.5)