Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

DevAppend

  • Last UpdatedJul 18, 2023
  • 1 minute read

Appends a blank record to the end of a device. After the record is appended, you can use the DevSetField function to add data to fields in the record.

Note: For SQL devices this function is a blocking Cicode function. Data should be added to all requested fields in the row via the Cicode function DevSetField before DevAppend is applied.

You need to first call the DevOpen function to get the device handle (hDev).

Syntax

DevAppend(hDev)

hDev:

The device handle, returned from the DevOpen function. The device handle identifies the table where all data on the associated device is stored.

Return Value

0 (zero) if the record is successfully appended, otherwise an error code is returned.

DevOpen, DevSetField

Example

INT FUNCTION WriteAlarmCount( INT hDevice, STRING sAlarm, INT iCount, INT iTime )

DevAppend(hDevice);

DevSetField(hDevice, "ALARM", sAlarm);

DevSetField(hDevice, "TIME", IntToStr(iTime));

DevSetField(hDevice, "COUNT", IntToStr(iCount));

END

For SQL devices the above example will not work. Instead use the following example:

INT FUNCTION WriteAlarmCount( INT hSqlDevice, STRING sAlarm, INT iCount, INT iTime )

DevSetField(hSqlDevice, "ALARM", sAlarm);

DevSetField(hSqlDevice, "TIME", IntToStr(iTime));

DevSetField(hSqlDevice, "COUNT", IntToStr(iCount));

DevAppend(hSglDevice);

END

See Also

Device Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in