Gets information on a device.
The device handle, returned from the DevOpen() function. The device handle identifies the table where all data on the associated device is stored.
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
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
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
The device information as a string if successful, otherwise an empty string is returned.
! Get the number of fields in a device.
FOR I=1 TO NoFields DO
! Get and display the name of each field.
nLength=DevInfo(hDev,-I - NoFields);
Prompt("Field Name "+sField + "Length " + nLength:##);