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

AVEVA™ Plant SCADA

DevInfo

  • Last UpdatedJul 18, 2023
  • 2 minute read

Gets information on a device.

Syntax

DevInfo(hDev, nType)

hDev:

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

nType:

Type of information:

-n: Name of field n (where n is any number up to the total number of fields). For example, if there are 10 fields, -7 will return the name of field 7.

- (Total no. of fields + n): Length of field n (where n is any number up to the total number of fields). For example, if there are 10 fields, -15 will return the length of field 5.

0: Device Name

1: Format

2: Header

3: File Name

4: Number of history files

5: Form length

6: Number of fields

7: Disable flag

8: Device type

9: Record size

10: Format number

11: Type of history schedule:

• 0: Event triggered

• 1: Daily

• 2: Weekly

• 3: Monthly

• 4: Yearly

12: The history period, in seconds, or week day, month or year, for example, if history is weekly then this is the day of the week, that is 1 to 7

13: Synchronisation time of day of the history in seconds, for example, 36000 (that is, 10:00:00)

14: The time the next history file will be created in seconds

Return Value

The device information as a string if successful, otherwise an empty string is returned.

DevControl

Example

! Get the number of fields in a device.

NoFields=DevInfo(hDev,6);

FOR I=1 TO NoFields DO

! Get and display the name of each field.

sField=DevInfo(hDev,-I);

nLength=DevInfo(hDev,-I - NoFields);

Prompt("Field Name "+sField + "Length " + nLength:##);

END

See Also

Device Functions

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