Driver PDF
Driver PDF
Version 8.07
User Guide
Copyright
The information in this document is subject to change without notice and does not represent a
commitment on the part of Afcon Software and Electronics Ltd.
No part of this document may be used or reproduced in any manner whatsoever without written
permission from Afcon Software and Electronics Ltd.
The software described in this document is provided under a license agreement or a nondisclosure
agreement.
The software may be used or copied only in accordance with the terms of the agreement. It is
against the law to copy this software on any other medium for any purpose other than the
purchaser's personal use.
Pulse logos, P-CIM and P-CIM logos are registered trademarks of Afcon Software and Electronics
Ltd.
Afcon and the Afcon logos are registered trademarks of Afcon Software and Electronics Ltd.
Introduction................................................................................................................... 5
Requirements .............................................................................................................. 6
Installation ................................................................................................................... 7
Hardware..................................................................................................................... 11
Communication Setup................................................................................................ 16
CollapseWrite .......................................................................................................... 34
ReflectWrite............................................................................................................. 34
Rounding ................................................................................................................. 35
Conversions ............................................................................................................... 40
$Variables ............................................................................................................... 44
Appendix A - Specifications........................................................................................ 50
The Modbus driver, during runtime, runs in the background continually, communicating
with PLCs, and providing access to PLC data by continuously polling Pulse addresses. Data
is written to the PLC on operator or application demand after the constant transaction is
completed.
Alarm and event messages are displayed in the Alarm Explorer and/or Alarm Handler
module.
The Modbus driver supports cellular communications when Packet Data settings are defined
in the Communication Settings dialog box.
• ASCII
• RTU
• TCP/IP
• Packet data
The number of digits shows the syntax used in the P-CIM Configurator.
• The driver communicates through COM 1 and COM 255 ports, or, the PC’s
Ethernet adapter port.
• The driver communicates through each PC port with up to 255 separate PLCs,
numbered 1 to 255.
Software:
For MBPlus networks: check that SA85 or SM85 are installed correctly.
NOTE: When installing drivers, make sure that Pulse is shut down.
1 Insert the AFCON DVD into the DVD drive on your computer. Wait for it to open on
your screen.
2 Select Pulse, select Communication Drivers and then Open to open the
Communication Drivers dialog box.
4 Click Next. Select a project or install the driver into multiple projects using the
standard Windows selection key combinations (<Shift>+click, <Ctrl>+click, <Ctrl>+A
[for all]).
5 Click Next. Review the summary information. You may expand the driver table to see
which files the driver setup will install and their destination folder.
Report All Generate a report detailing the installation of the driver files.
Generate a report detailing any errors which may have occurred
Report Errors
during the driver installation.
Start Pulse The Pulse Server will start up after you click Finish. After the
Server Server completes startup, the Driver Setup wizard closes.
File Paths
The files associated with this driver and files common to all drivers in the system are listed
below in their default locations:
NC 1 1 SHLD CD 1 1 SHLD
RX 2 2 RX RX 2 2 TX
TX 3 3 TX TX 3 3 RX
DTR 4 4 DTR DTR 4 4 RTS
GND 5 5 GND GND 5 5 CTS
DSR 6 6 DSR DSR 6 6 DSR
RTS 7 7 RTS RTS 7 7 GND
CTS 8 8 CTS CTS 8 8 CD
9 NC 20 DTR
P-CIM
RS232/RS485
PC AT 9 PIN J478/S978
25 PIN
SHLD 1 1 SHLD
RX 2 2 TX
TX 3 3 RX
DTR 4 4 RTS
GND 5 5 CTS
DSR 6 6 DSR
RTS 7 7 GND
CTS 8 8 NC
NC 9 20 DTR
NO CPU NO CPU
HUB
Interface adapter
installed 3COM
P-CIM
Line
P-CIM Modem
Telephone
Service
PLC
Line
Modem
PLC
Line
Modem
Line
P-CIM Modem
PLC
Line
Modem
PLC
Line
Modem
12?
12?
5 4 3 2 1 5 4 3 2 1 5 4 3 2 1
9 8 7 6 9 8 7 6 9 8 7 6
2 To assign a new port to a driver, click the New button; to edit an already assigned port,
select the appropriate port in the Assigned ports box and click the Edit button. The
Port Properties dialog box appears on your screen.
3 To assign a new port, type a number between 1-255 in the Port Name box. For an
already assigned port, the port number is displayed.
Field Description
Port name This is a virtual port that has no functionality in the software. A
virtual port number can be anything between 1 and 255 and can be
used only once.
Driver name This list holds the names of all the drivers installed in the current
project. A driver can be used any number of times.
Bit numbering This field defines the read bit access used. For example if Octal is
system used the digits 8, 9 are not available. Our recommendation is to
leave the setting at its default of 10 decimal.
Lowest bit Select 1 in this field to define the bit numbering for this driver is
number 1-16. (When 0 is selected, it defines the bit numbering for this driver
is 0-15).
5 Click OK.
The Port Properties dialog box is closed. The assigned port, the name of the new driver
and the mode all appear in the Assigned ports box in the Project Communication Setup
dialog box. The port allocation is recorded in the DRVRPORT.INI file.
Note that it is possible to define communication on a single PLC via two or more P-CIM ports
and communication for multiple PLCs via a single P-CIM port can be defined.
In the Project Communication Setup dialog box, select the relevant assigned port and click
the Properties button
• Transport and Station Parameters, where different dialog boxes open according
to the selected network type.
Field Description
P-CIM port Displays the port selected in the Pulse Communication Setup
dialog box, Assigned Ports field.
Polling When clicked opens the Polling Configuration dialog box where
configurations you define blocks of driver address with different scan settings
to that of the default scan parameters.
Read before bit write Reads and checks the register’s last value immediately before
writing to a specific bit in the register.
Force multiple write Instructs the driver to use the multiple write function to force
for all stations write a single register.
Time-out The driver waits the defined amount of time for a valid reply
from the PLC, and retries the transaction twice if a reply is not
received or is garbled.
The default value is 1-second, ranging from 0.5 to 50 seconds.
Min reconnect Defines the minimum amount of time in minutes the Pulse
driver waits before trying to reconnect to a PLC declared as
failed.
Default is 1-minute.
Default Min. Address Sets the minimal address length. To match the minimal length
Length defined, a leading 0 is added to every address that is below
this threshold. Addresses that are equal to or higher than the
defined threshold are not changed.
1 In the Network Type field select RS232 from the drop-down list to open the Transport
Parameters – RS232 dialog box.
Field Description
Stop bits Showing the number of bits in each byte signaling the end of the byte.
• RTU
• ASCII
Station When clicked opens the Station Parameters – RS232 dialog box.
parameters
1 To open this dialog box, click the Station Parameters button in either the P-CIM
configurator for Modbus Driver or in the Transport Parameters dialog boxes.
2 Click the Add button to open the Add New Stations dialog box.
Field Description
PLC Number Marking the logical number of the PLC in Pulse at runtime.
Min. Address Sets the minimal address length. To match the minimal length
Length defined, a leading 0 is added to every address that is below this
threshold. Address that are equal to or higher than the defined
threshold, are not changed.
3 Select the number and PLC Type using the information in the table above.
4 Click OK to save these definitions and to return to the Station Parameters dialog box.
Secondary Transport
1 Select the Use Secondary Transport option to enable the use of a secondary
communications channel (i.e, port, secondary server) in a Redundancy configuration.
1 In the Network Type field, select Ethernet or Packet Data from the drop-down list to
open the Transport Parameters – Ethernet (or Packet Data) dialog box.
Field Description
Default remote Defines the bidirectional connection method to the PLC from and
port to the PC. In Packet data the default for the default remote port
is 1195, which can be changed.
Transport Protocol Specify the transport protocol of the network: TCP or UDP.
Multi Sockets When checked indicates that if more than one IP address and port
are defined, communication for each IP address is made
simultaneously.
Checked by default.
Use Ping Enables the system to send a ping, during Pulse startup, to check
which PLCs are connected and operating. This option is enabled
by default.
Support unsolicited When checked sets Pulse in “passive” mode, in which the PLC
messages sends burst messages to Pulse. This method of communication
can only be used once per driver.
Station parameters When clicked opens the Station Parameters – Ethernet dialog box.
Field Description
Min. Sets the minimal address length. To match the minimal length defined, a
Address leading 0 is added to every address that is below this threshold. Address
Length that are equal to or higher than the defined threshold, are not changed.
Port Defines the bidirectional connection method to the PLC from and to the
PC.
Index When more than one PLC is connected to the same IP address an Index
is used to distinguish between PLCs.
3 Click the Add button to open the Add New Stations dialog box.
PLC Number Marking the logical number of the PLC in Pulse at runtime.
Port Defines the bidirectional connection method to the PLC from and to
the PC.
Index When more than one PLC is connected to the same IP address an
Index is used to distinguish between PLCs.
Min. Address Sets the minimal address length. To match the minimal length
Length defined, a leading 0 is added to every address that is below this
threshold. Address that are equal to or higher than the defined
threshold, are not changed.
Secondary Transport
1 Select the Use Secondary Transport option to enable the use of a secondary
communications channel (i.e, port, secondary server) in a Redundancy configuration.
1 In the Network Type field select MBPlus from the drop-down list to open the Transport
Parameters – MBPlus dialog box.
Field Description
LAN number Showing the ID of the MBPlus card in the computer, for
example: SA85.
1 To open this dialog box, click the Station Parameters button in either the P-CIM
Configurator for Modbus Driver or in the Transport Parameters dialog boxes.
2 Click the Add button to open the Add New Stations dialog box.
Field Description
PLC Number Showing the logical number of the PLC in Pulse at runtime.
Min. Address Sets the minimal address length. To match the minimal length
Length defined, a leading 0 is added to every address that is below this
threshold. Address that are equal to or higher than the defined
threshold, are not changed.
Redundant Route Sets the redundant PLC route. Use this option as a backup in case
when the driver is unable to connect to primary PLC.
Show advanced When clicked displays the Advanced Parameters options for
parameters further information see page 31.
3 Complete this dialog box using the information in the table above.
4 Click OK to save these definitions and to return to the Station Parameters dialog box.
Secondary Transport
1 Select the Use Secondary Transport option to enable the use of a secondary
communications channel (i.e, port, secondary server) in a Redundancy configuration.
1 In the Transport dialog box click the Modem Parameters button to open the Modem
dialog box.
Field Description
Default phone Indicating the phone number used when a PLC does not have a
number phone number mentioned.
Dial using Defines the dialing mode used, which can be either Tone or Pulse.
Phone When clicked opens the Phone Parameters dialog box where PLCs
parameters and phone numbers can be assigned and displayed in a list, see
page 24.
Redial This field defines the settings by which the modem tries to redial
parameters to the PLC when communication is not successful.
PLC ID When clicked opens the PLC ID Parameters dialog box where an
parameters identification string can be configured for each PLC.
1 In the Modems dialog box Auto Answer field check the Enable checkbox. The PLC ID
Parameters button option is enabled.
2 Click the PLC ID Parameters button to open the PLC ID Parameters dialog box.
3 Click the Add button to open the Add PLC ID String dialog box.
4 Scroll to the relevant PLC number and then type in the string in the ID String field.
5 Click OK to return to the PLC ID Parameters dialog box. Complete this dialog box using
the information below:
Field Description
Hang-up after Check when using two modems connected to two ports for:
getting PLC ID
string • Outgoing calls
• Incoming calls
When checked the driver hangs up after receiving the call and calls
back using the port configured for outgoing calls.
PLC ID string Defines the waiting time (in seconds) for receiving information (range
waiting time 1 - 15, default is 1).
1 Click the Phone Parameters button in the Modem Parameters dialog box to open the
Phones Parameters dialog box.
2 Click the Add button to open the Add Phone dialog box, where the association between
the Modem and PLC is defined.
3 In the Phone Number field type in the phone number that is associated with a PLC.
4 In the PLC list click the relevant PLC number. The phone number is displayed next to
the selected PLC number.
5 Click OK to confirm and to return to the Phone Parameters dialog box where the
associated PLC and phone numbers are listed.
In the Add New Station dialog box, check the Show Advanced Parameters checkbox
to access the Advanced Parameters dialog box.
1 In the P-CIM Configurator for Modbus Driver dialog box, click the Polling
Configuration button to open the program.
2 Click the Add button to open the Add Polling Block dialog box.
Field Description
Always on scan When checked defines that item/s are continually scanned,
even if an item is not an advised item in the application.
Start address Showing the first address in the block that is configured.
Scan time Showing the total amount of time the address block is scanned.
Bit Representation
In the application the driver enables access to a specific reference bit. This bit is regarded
as a digital point. Bits can be referenced in the decimal range. Pulse bit numbering
convention for a data reference is:
The BitZero token is used to configure port settings individually. In the MODBUS.INI file
the default for each configured port is: BitZero=0, showing that bit numbering for the port
is 1-16.
To change the bit numbering for the port to 0-15, open the INI File Editor and in the
MODBUS.INI file, select the relevant port and change the setting to BitZero=1.
CollapseWrite
This MODBUS.INI file setting enables sequential writing to a reference. By default,
CollapseWrite=0 (sequential writing) is enabled.
Open the Pulse INI File Editor and change the default setting to CollapseWrite=1.
The driver switches automatically to CollapseWrite=1.
The Alarm Summary displays a message if more than 4096 write addresses are in the
queue. This setting can be changed in the MODBUS.INI file, section: ['Port'], token:
MaxWrite Queue.
ReflectWrite
When the token ReflectWrite=1,(by default) token is defined, the driver returns an
updated value immediately after a successful read operation.
Open the INI File Editor and make the following change: MODBUS.INI.Set
ReflectWrite=0.
Open the Pulse INI File Editor and change the default setting 1 to Rounding=0. This enables
truncation of any decimal value inserted to a reference.
Address Syntax
PLC data handled by the driver is accessed by the Pulse Kernel and the driver’s server by
a callback and a DDE link in the following format:
Server, Topic, Item
Topic PCIM
4-DIGIT 1
5-DIGIT 2
6-DIGIT 3
S60001 - S69999
4 Addresses in MBPLUS mode can only be written to when the PLC number
equals the Adapter Number (for example: 2:8:GD30).
The Server, Topic, and Item (DDE Link) are usually mentioned in Windows client
applications in one of two formats:
2 Together, in one field usually labeled Link. the vertical bar ("|") and exclamation mark
("!") separators are used. For example: Server|Topic!Item "
Address: 40004, PLC No: 2, Connected to Pulse port: 3, Bit No: 12 (of same address)
Can be either:
and
Or:
Link: DBSR|PCIM!3:2:40004
and
Link: DBSR|PCIM!3:2:40004:12
Conversions can be used in the Pulse database, together with the fields Conversion, Low
scale and High scale for specific block types. Driver conversions can also be accessed at
runtime with the DBSR, PFWDRVR and Modbus server. The syntax is described below:
Server|Topic!Item,Conv
For example:
The DDE specification for conversion DIV10 of the address 40004 is:
Link: DBSR|PCIM!3:2:40004,DIV(10)
The DDE specification for conversion LIN1 of the address 40004 is:
address,LIN(Slow,Shigh,Clow,Chigh)
The linear conversion algorithms listed below have the following abbreviations:
R = Raw value
L = Low scale
H = High scale
Default, no
NONE conversion
M10 Multiplies the raw data by 10 and divides the value written to the controller
by 10
M100 Multiplies the raw data by 100 and divides the value written to the controller
by 100
M1K Multiplies the raw data by 1000 and divides the value written to the controller
by 1000
D10 Divides the raw data by 10 and multiplies the value written to the controller
by 10
D100 Divides the raw data by 100 and multiplies the value written to the controller
by 100
To display driver conversions, in the Project Communication Setup dialog box select a line
and then click the Get Info button.
The Pulse Drivers Server - PFWDRVR, has customizable conversions that can be configured
and used in your applications.
‘address’,‘conversion’
or
address’;‘conversion’, for national language support if the list separator is ';'
where address is the actual direct address or block name of the data to be converted.
The conversion can be one of the following:
ValueOK OK/BAD
DIV(n.m) Divides the raw data by n.m and multiplies n.m=float no.
by n.m the value written to the controller for n=0, m=0 returns
the raw value
MUL(n.m) Multiplies the raw data by n.m and divides n.m=float no.
by n.m the value written to the controller
Use the generic conversions together with the driver address to create blocks
with the Database Explorer. To prevent unpredictable results, set the conversion
field to NONE in the block.
Table 6: $Variables
$Station Variables
$Modem Variables
Startup This message appears during startup and displays the driver name,
networking type and operation mode.
Time (HH:MM:SS) MODBUS Driver Ethernet/RS232/MBPLUS)
Port n, successfully loaded Time (HH:MM:SS) MODBUS Driver,
Port n, successfully loaded in Emulation mode!
Check that the Modbus driver started up, and in the defined mode.
Failure This message indicates communication failure between the PLC and
PC and is displayed when a value cannot be read/written in the
specified Max Timeout.
Modbus Driver, Port n, PLC m, failed during INPUT Modbus
Driver, Port n, PLC m, failed during OUTPUT
Check the physical link between the PC and PLC
Reconnection This message indicates that communications between the PC and PLC
has been re-established.
Time (HH:MM:SS) MODBUS Driver, Port n, PLC m, RECONNECTED
Do the following:
Read This message can be displayed when scanning addresses that are not
defined in the PLC.
Time (HH:MM:SS) Modbus Driver, Port n, PLC m, Address x
OK!
Open the Add New Stations dialog box and in the Memory
Configuration field define the addresses that will not be scanned.
Failed to Open This message appears when a Pulse driver tries to communicate with
a physical port that is used by another device. For example, COM1 is
used by another software.
Modbus, Port “1”, (RS232 –RJU) Failed to open
Check that the physical port that is defined in the virtual Pulse port is
not in use.
Code Description
01 The function code received in the query is not an enabled action for the
slave. When a Poll Program Complete command is issued, this code
indicates that no program function preceded it.
02 The data address received in the query is not an enabled address for the
slave.
03 A value contained in the query data field is not an enabled value for the
slave.
05 The slave has accepted the request and is processing it. This will take a long
time. The response is returned to prevent a timeout error from occurring in
the master. The master can next issue a Poll Program Complete message
to determine if processing is completed.
07 The slave cannot perform the program function received in the query. This
code is returned for an unsuccessful programming request using function
code 13 or 14 decimal. The master should request diagnostic or error
information from the slave.
08 The slave tried to read extended memory, but detected a parity error in the
memory. The master can retry the request, however the slave may require
maintenance.
Supported Protocols
Baud Rates 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 56600,
115200, 128000 and 256000.
Data Bits 7, 8
LAN No 0, 1
2 In the Name box, enter the string specifying the data value to check, or use immediate
alias. This string is usually composed of a PLC source, port, and an item or alias.
3 In the Value box, enter the value and click OK. To enter an alias, enclose between
ampersands (&alias&). The result will appear in the Status column after the Pulse
Server responds.
1 In the AFCON Pulse Program Group, open the Runtime folder and click Alarm
Handler. From the Alarm Summary’s File menu, click Show Daily Log.
2 Scroll to the top to view all the system messages in the list.
During Pulse startup, the Alarm Summary is refreshed.
1 From the Windows tray, right-click the Pulse Kernel Server icon, point to
Communication and click Pulse Drivers Server.
2 In the List of Loaded Drivers, check if the name of the driver is displayed in the
Assigned Ports list.
6127 Fixed a problem in which the behavior of the primary port 7.86
connection, when a secondary port was also connected and
configured, was not consistent with the behavior when no
secondary port was configured. Some settings or features
performed differently.
6101 Fixed a problem in which the user needed to restart P-CIM 7.86
after turning the DebugSpy setting on (modbus.ini>[1]
token>DebugSpy string>0 to 1).
This issue has been fixed. From this version, you turn the
DebugSpy tool on or off by using the following syntax in an
advised item field: Port:Plc:$PortSpyMode.
5872 When the Modbus driver was used in an Ethernet connection 7.86
with Multiple Network Cards enabled but no Host IP Address
defined, the driver tried to connect to a disconnected network
card.
This issue has been fixed. The Multiple Network Cards and
Host IP Address options are no longer relevant and have been
removed.
5815 In MODBUS Driver Rev. 7.58, the driver did not reconnect to 7.66
the PLC when P-CIM tried to restart after being disconnected.
This issue has been fixed. In the current version, make sure
that P-CIM
Setup>Communication>Properties>ETHERNET
Transport Parameters>Multiple Network Cards is
selected.
5172 In MODBUS Driver Rev. 7.39, when writing a single coil 7.58
action, and the "Force Multiple Write for all Stations" option is
selected (or in case that the "Enable Multiple Write" option is
selected for a specific PLC), the driver used the single coil
write command (05) instead of the multi coil write command
(0F Hex).
5386 In the MODBUS Driver Rev. 7.27 Configurator, if the "Host IP 7.58
Address" field is blank, the driver did not proceed with the
configuration, displaying an error message stating that the
“Host IP Address” must contain a valid IP address.
This issue has been fixed. In the current version, if the “Host
IP Address” field is blank, the driver retrieves the address of
the connected communication card.
The DBSR does not increase its memory usage anymore when
the string is CollapseWrite=1.
The response time for the Modbus Ethernet I/O addresses was
delayed when the Pulse application contained multiple
frames. Some of the frames returned values after a relatively
long delay partly caused by the PLC.
The driver can manage multiple sockets for one physical PLC.
This assures that the data is copied to the advised addresses
specified in the application using the actual PLC number. Make
sure that the digit number per PLC is equal to the number in
the multiple rows.
Solution:
6693 The Modbus Driver did not send the Stop/Resume 8.07
messages of the Secondary Transport to the Alarm
Summary
6691 The Modbus driver closed and deleted all sockets when 8.07
a ‘Resume’ process began
The Modbus Driver did not close and delete all sockets before
stopping TCP/IP communications for Ethernet, Packet Data,
and more.
The issue has been fixed. The Modbus Driver now closes and
deletes all sockets before stopping the TCP/IP communication
for Ethernet or Packet Data.
6655 The driver did not close the common socket for all PLCs 8.07
having the same IP Address and Port number
When the application had more than one PLC with the same
IP Address and Port number in the previous Modbus Driver
version; the driver did not close the common socket for all the
PLCs having the same IP Address and Port number when an
Unadvised action to all items of the PLCs were made.
The issue has been fixed. Now, there is only one switch for all
address types for each PLC.