Saia S-BUS / Ether S-BUS / Saia Ip
PcVue supports communication with Saia PCD controllers, including the PCD 2, PCD 4, PCD 5 and PCD 6 series.
Three drivers are available depending on your requirements:
-
S-BUS - For serial communication using the SBUS parity mode
-
Ether S-BUS and Saia Ip - For communication over Ip
You can configure the Saia Ip driver using the Smart Generator made for it.
Prerequisite
For the S-BUS serial driver, a path configuration is required, follow the steps below before configuring an equipment.
You have to specify the path where the PcVue driver can find the SAIA DLL files, SCommDll.Dll or SCommDll52.dll, installed with the SAIA programming environment (PG5). To do so, you must modify the system environment variable PATH as follows.
- Open the Windows Environment Variables pane. On most versions of Windows, you can locate it by typing Environment in the Search Windows prompt and select the global PATH environment variable.
- Click on Edit to open the Edit System Variable dialog and in the Variable Value field, enter the path to the folder of the SAIA Burgess programming software (PG5).
- Restart the PC to apply the new PATH.
If the PATH contains any element for other software, keep them by adding a semicolon (';') to the end, followed by the new path.
Network properties
This topic only includes a reference of objects' properties.
See the topic How to configure networks devices and frames for more information about how to configure communication objects.
When configuring the network, select the driver that fits your needs:
-
SBUS
-
Ether SBUS
-
Saia Ip
The rest of the configuration is the similar, the only differences are related to the serial port vs Ip configuration properties.
Ether SBUS and Saia Ip drivers
| General properties | |
| Name | The name of the network |
| Description | The description of the network (optional) |
| Activate at start-up | If enabled, the network will start upon Equipment communication start-up |
|
Advanced properties |
|
|
Timeout |
Use default value |
|
Networking |
|
|
Servers |
The list of PcVue stations where the network will be active |
| Enable network serialization | Used to activate serialization of connections by network. This option is useful when several devices can be reached via the same network path and that this network path requires requests to be serialized. |
SBUS driver
| General properties | |
| Name | The name of the network |
| Description | The description of the network (optional) |
| Serial port | The COM port associated to the network |
| Activate at start-up | If enabled, the network will start upon Equipment communication start-up |
|
Advanced properties |
|
|
Timeout |
Use default value |
|
Networking |
|
|
Servers |
The list of PcVue stations where the network will be active |
|
Serial port parameters |
|
| Baud rate | The baud rate on the serial line |
| Data bits | The number of data bits on the serial line |
| Parity | The parity set on the serial line |
| Stop bit(s) | The number of stop bits on the serial line |
| Modem handshaking | If enabled, modem handshaking is performed for flow control on the serial line |
| Use Data mode | Transmission mode, overrides the value of the parity property if defined |
Device properties
Ether SBUS and Saia Ip drivers
| General properties | |
| Name | The name of the device |
| Description | The description of the device (optional) |
| Equipment type | Select the type of equipment that best suits the field device you want communicate with. The list of frame types and address ranges depend on the equipment type. |
| Address | The Ip address of the field device. Some drivers also support configuration by host name. |
| Activate at start-up | If enabled, the device will start upon network start-up |
|
Advanced properties |
|
|
Connection |
|
|
Timeout |
Maximum waiting time between a request and the reply from the equipment |
|
S-Bus address |
The S-Bus address of the field device |
|
Port number |
The port number of the field device |
|
CPU number |
CPU number in the range 0 to 6 |
|
Timestamping |
|
|
Enable |
Tick to enable field device timestamping mode |
| Error address | If timestamping is enabled, the address used to indicate a full stack. Must be set to a positive value (greater than 0). |
| Timestamp UTC | Specify if the field device transmits timestamps as UTC or as local time |
| Delta TS |
Used to set-up direct archiving. If the difference between the timestamp coded in a received timestamped block and the current time is greater than the Delta TS value, the data is sent directly for archiving but is not considered fresh enough to be used as instantaneous value. As a consequence, the value of the corresponding variable is not updated. |
|
Miscellaneous |
|
|
Virtual |
Reserved. Do not select. |
| Message delay | Reserved. Leave default value 0. |
SBUS drivers
| General properties | |
| Name | The name of the device |
| Description | The description of the device (optional) |
| Equipment type | Select the type of equipment that best suits the field device you want communicate with. The list of frame types and address ranges depend on the equipment type. |
| S-Bus address | The S-Bus address of the field device |
| Activate at start-up | If enabled, the device will start upon network start-up |
|
Advanced properties |
|
|
Connection |
|
|
Timeout |
Maximum waiting time between a request and the reply from the equipment |
|
CPU number |
CPU number in the range 0 to 6 |
|
Timestamping |
|
|
Enable |
Tick to enable field device timestamping mode |
| Error address | If timestamping is enabled, the address used to indicate a full stack. Must be set to a positive value (greater than 0). |
| Timestamp UTC | Specify if the field device transmits timestamps as UTC or as local time |
| Delta TS |
Used to set-up direct archiving. If the difference between the timestamp coded in a received timestamped block and the current time is greater than the Delta TS value, the data is sent directly for archiving but is not considered fresh enough to be used as instantaneous value. As a consequence, the value of the corresponding variable is not updated. |
|
Miscellaneous |
|
|
Virtual |
Reserved. Do not select. |
| Message delay | Reserved. Leave default value 0. |
Frame addressing
Depending on the equipment type you have selected when configuring the device, you have access to the following type of frames.
The Starting address and Quantity properties define the memory address range for each frame, how it is read from and written to, and how it is interpreted in PcVue.
| Data type | Access | Max quantity | Starting address |
| Bit | |||
| I |
Read |
224 (Ether S-BUS, S-BUS) 22400 (Saia Ip) |
0..65535 (Ether S-BUS, Saia Ip) 0..8191 (S-BUS) |
| O |
Read/Write |
224 (Ether S-BUS, S-BUS) 22400 (Saia Ip) |
0..65535 (Ether S-BUS, Saia Ip) 0..8191 (S-BUS) |
| F | |||
| WordBit R |
Read/Write |
32768 (Ether S-BUS, S-BUS) 716800 (Saia Ip) |
0..65535 (Ether S-BUS, Saia Ip) 0..4095 (S-BUS) |
| Real | |||
| R |
Read/Write |
32 (Ether S-BUS, S-BUS) 700 (Saia Ip) |
0..65535 (Ether S-BUS, Saia Ip) 0..4095 (S-BUS) |
| C (S-BUS driver only) |
Read/Write |
32 |
0..1599 |
| T (S-BUS driver only) | |||
| Double word | |||
| R |
Read/Write |
32 (Ether S-BUS, S-BUS) 700 (Saia Ip) |
0..65535 (Ether S-BUS, Saia Ip) 0..4095 (S-BUS) |
| T |
Read/Write |
32 (Ether S-BUS, S-BUS) 700 (Saia Ip) |
0..65535 (Ether S-BUS, Saia Ip) 0..1599 (S-BUS) |
| C | |||
| S |
Read |
1 | 0 |
| HD Exchange |
Read |
3 (Ether S-BUS, S-BUS) 32 (Saia Ip) |
0..65535 |
Driver status
The driver status provides driver-specific information to supplement the frame general status. For more information on status in general, refer to the topic General communication status.
SAIA library status - S-BUS serial driver
| Driver status | Description |
| 0 | Communications OK |
| 1 | NACK response (command not accepted) |
| 3 | Invalid BCC or CRC (no other errors) |
| 4 | Invalid response |
| 5 | Bad connection between P800 and PCD6 |
| 6 | No response (Request time out) |
| 7 | No response after PcdRestart in PcdWrAllocation |
| 8 | No Data Carrier Detect |
| 9 | Port in use in another mode or baud rate |
| 10 | Bad parameter |
| 11 | PCD memory write verify error |
| 12 | PC out of memory |
| 13 | Physically connected to wrong CPU on PCD6 |
| 14 | CPU not present |
| 15 | PCD to flash failed on M170 |
| 16 | Files & CPU do not compare (see PcdCompare) |
| 17 | Cannot open file |
| 18 | Error writing to file |
| 19 | Error reading file |
| 20 | Invalid PCD file |
| 21 | PCD file checksum error |
| 22 | Invalid header in PCD |
| 23 | Not enough space in code segment |
| 24 | Not enough space in text segment |
| 25 | Extension memory segment too small |
| 26 | Header not initialized |
| 27 | Cannot write EPROM memory |
| 28 | Operation canceled by user |
| 29 | Block not defined |
| 30 | CPU must be in Stop or Halt |
| 31 | CPU not programmed |
| 32 | (INTERNAL) Special status for debugging |
| 34 | Cannot change size of extension memory |
| 35 | COM port is not open or PCDCONN handle is invalid |
| 36 | Write to PCD failed |
| 37 | Port request timeout |
| 40 | Port is in use |
| 44 | Fatal internal error |
| 45 | Operation not supported by PCD F/W version |
| 46 | Station number already defined |
| 47 | Not enough space for extended header |
| 48 | Invalid password |
| 49 | Extended header checksum error |
| 50 | Download to wrong S-Bus station ($STN) |
| 51 | Download to PCD with wrong firmware ($PCDVER) |
| 52 | S-Bus Parity mode is not supported for this COM port |
| 54 | RTS/CTS mode is not supported for this COM port |
| 55 | Connected PCD's type does not match hardware settings |
| 56 | (BUES) Error in Sql Statement |
| 63 | Internal data invalid |
| 64 | C++ Exception in DLL |
| 65 | Ask for password |
| 67 | Timeout is not supported for this COM port |
| 68 | Driver not available |
| 69 | (BUES) Received a BUES CMD_E response |
| 70 | (BUES) Received a BUES CMD_A response |
| 71 | Cannot Activate SAP |
PcVue driver status - S-BUS serial driver
| Driver status | Description |
| 0x0413 | DLL initialization problem. Check that the PATH environment variable has been correctly set |
| 0x1000 | Invalid data type. Check data type |
| 0x1001 | Invalid parameter |
| 0x1002 | Incorrect port number |
| 0x1003 | Wrong baud rate |
| 0x1004 | Wrong SBUS address |
PcVue driver status - Ether S-BUS and Saia Ip drivers
| Driver status | Description |
| 0x1000 | Invalid data type. Check data type |
| 0x1001 | Invalid parameter |
| 0x1003 | Header error |
| 0x1004 | CRC error |
| 0x1005 | Wrong Id |
| 0x1006 | Wrong number of data |
| 0x1007 | Data type error |
| 0x1008 | Version error |
| 0x1009 | Socket error |
| 0x1010 | Wrong telegram type |
| 0x1011 | CPU error |
| 0x1012 | SBUS send error |
| 0x1013 | SBUS receive error |
| 0x1014 | SBUS timeout |
SCADA Basic scripting
You can control communication with this driver in SCADA Basic scripts with the CIMWAY instruction.
The driver also supports the following specific capabilities in SCADA Basic.
Changing a device address
IntVal = CIMWAY(CFG, CommObjName, Modif, Param, [, ResultVar]);
|
Argument |
Meaning |
|
CommObjName |
Configuration element to modify: A device. |
|
Modif |
The property you want to modify: |
|
|
EQT_ADDRESS: Modification of the equipment address. CommObjName is the name of a device attached to the network. For example, Net1.Dev1. |
|
Param |
Param is a string with a typical syntax like Param1#Param2#Param3...#ParamN. Type STR. See below for the syntax specific to this driver. |
|
ResultVar |
Specifies the name of the variable where the status of the modification is stored. |
Syntax for Saia Ip:
sbus_address#ip1#ip2#ip3#ip4#tcp_port#cpu#ts_erroraddress#flag
Where:
-
sbus_address: The sbus slave address
-
ip1 to ip4: The 4 segment of the Ip address
-
tcp_port: The Tcp port number
-
cpu: The CPU id
-
ts_erroraddress: The error address for source timestamping
-
flag: Additional properties under the form of a bit mask(0 or 1)
-
bit 4 Timestamp UTC (1) or local (0)
-
Timestamped data - Data table and block structures
Timestamped data table structure
The interchange stack for timestamped data is stored in table R.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|
R |
Reserved
|
Number of blocks (N) | ||||||||||||||||||||||||||||||
|
R + 1 |
Start of the first block | |||||||||||||||||||||||||||||||
| R+1+(N-1)*T | Start of the last block | |||||||||||||||||||||||||||||||
where:
T = size of timestamped block
N = Number of blocks as specified by the timestamp frame's Quantity of Data property.
W = The starting address as specified by the timestamp frame's Starting address property.
Timestamped block structure with IEC (T = 4)
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|
R + 1 |
Reserved
|
Type | Address | |||||||||||||||||||||||||||||
|
R + 2 |
Value 1 | Value 0 | ||||||||||||||||||||||||||||||
| R + 3 | Reserved | Day | Month | Year | ||||||||||||||||||||||||||||
| R + 4 | Reserved | Hour | Minute | Second | Millisecond | |||||||||||||||||||||||||||
Value0 corresponds to the low-order part of a 32-bit value (real or double word) and to the only significant word when data are read as 16-bit values from a frame (word, byte or bit).
Value1 corresponds to the high-order part of a 32-bit value (real or double word) and to the bit offset in the byte of bit-type data.
Coding of the data Type field
|
Code for field type data |
Data Type |
|
0 |
Bit in F |
| 1 | Bit in I |
| 2 | Bit in O |
| 3 | Bit in R |
| 27 | Real in R |
| 33 | Double in T |
| 34 | Double in C |
| 35 | Double in R |
Coding of the date and time fields
| Field | Coding |
| Year | 0..99 (number of years since 1980) |
| Month | 1..12 |
| Day | 1..31 |
| Hour | 0..23 |
| Minute | 0..59 |
| Millisecond | 0..59999 |