TeleBUS Driver Addressing
A VTScada TeleBUS address is made up of four parts, separated by the colon character:
CommandCode:RunNumber:DataAddress:DataType
- The Command Code indicates to the RTU the type of data that should be loaded into the data registers.
Please see the RealFlo User and Reference Manual for the list of TeleBUS command codes. - The Run Number is the meter run that you wish to interact with.
- The Data Address is the address in the data registers of the specific piece of information that you’re looking for.
-
The Data Type is an optional parameter that should be set to one of the following:
Data Type | Description |
---|---|
SINT | Signed Short Integer |
UINT | Unsigned Short Integer |
SLONG | Signed Long Integer |
ULONG | Unsigned Long Integer |
FLOAT IEEE | Floating Point |
If the data type is omitted, a data type of “SINT” will be assumed.
As an example, retrieving the methane gas ratio from meter run 2 requires the following address:
801:2:49781:FLOAT
Bit Reads
The TeleBUS driver does not currently allow bit reads as some other drivers do (e.g. an address of 40001/0 in a Modbus driver will return only bit 0). If you need to read a single bit, first use the TeleBUS driver to read the entire byte into an analog status tag. Then use a separate calculation tag with the following expression to find the value of the bit that you’re looking for:
Bit([<AnalogStatusTagName>], BitNumber)
Special Command Codes
Most command codes result in a single read of the data registers, but there are a few that prompt the driver to do
specialized reads.
Alarm and Event Reads
Command codes 51 (Get requested new events) or 61 (Get requested new alarms) are used to start a read of the RTU’s alarm or event log. The TeleBUS driver will continue reading the logs until they are empty, with each alarm/event being deleted from the RTU’s log as it is read. Users of the Oil & Gas Solutions layer will not likely need to use these command codes, as the event log reading is handled by the flow computer tag.
Daily and Hourly History Log Reads
Command code 11 is used to read the RTU’s hourly history log. The most recent historical value will be read first, and then the driver will continue reading values until it reaches one that has a time stamp which has already been read.
Command code 12 may be used to read the RTU’s daily history log. This works just like command code 11 described above, however it may not be available on some older RTU models. In these cases command code 8888, described below, should be used instead.
The daily history of meter runs 1-3 is made available with a direct read, without the need to load any command into the command registers. The VTScada TeleBUS driver can access this history by using the custom VTScada command code 8888. The reads progress in the same way that they do under command codes 11 and 12, reading back until we reach a record with a time stamp that has already been read.
Note that in all three cases above, the data address used should be the address for the first day’s history – the driver will know where to look for the earlier days’ values. For example, the following are both examples of how to find the daily flow duration history for meter run 2:
12:2:44564:FLOAT
8888:2:46564:FLOAT
Direct Modbus Reads
There are some values, including many of the process values, that are accessed by ignoring the command registers and performing a standard Modbus read. Rather than having to reassign each of these tags to use the Modbus driver, custom VTScada command code 9999 allows you to pass a read directly to the child Modbus driver. For example, the address 9999:1:47528:FLOAT will return the flow rate.
Note that the run number servers no function in this mode, but something must be included in order to maintain a consistent address format