You are on page 1of 62

Model 1310 Network

Installation Manual
2 1310 Network Installation Manual
3 1310 Network Installation Manual
Pages are numbered consecutively beginning with the cover page.
Table of Contents
Introduction ..................................................................................... 5
1310 Diagnostics Menu ............................................................. 5
WT-BASIC Keyword MAP ....................................................... 6
Network Hardware and Installation ................................................. 9
DeviceNet
TM
........................................................................................................................................ 9
ControlNet
TM
.................................................................................................................................... 14
InterBus-S
TM
Interface ............................................................. 19
Modbus/TCP Ethernet Interface .............................................. 23
Modbus Plus Interface............................................................. 28
Profibus-DP ............................................................................. 33
Ethernet TCP/IP Raw Sockets ................................................ 38
Ethernet-IT (Internet protocol suite - HTTP, SMTP, FTP) ........ 46
Ethernet-IP .............................................................................. 52
4 1310 Network Installation Manual
5 1310 Network Installation Manual
Introduction
This manual covers the installation and configuration of the network proto-
cols which can be employed with the 1310 indicator from Weigh-Tronix.
The 1310 allows you to check the status of your network connection via the
front panel. This allows you to check LED status lights without physically
gaining access to the network board.
Follow the steps below:
1. Hold in the ESCAPE key for five
seconds. . . Setup Password is displayed.
2. Enter the number 911, then
press the ENTER key. . . The test menu will be displayed.
3. Press the MORE-NET key to
enter the network test menu. . . The first display will show the current
memory requirements for the
network. View the Total memory to
find out what the host system will be
requiring.
4. Press any key to continue to the
next screen. . . The network status screen will show
if the network is online, the status of
the diagnostic LEDs, and a free
running counter which represents
the watchdog counter for the net-
work card.
5. Press any key to continue. . . The Software version screen shows
what software version the network
card presently uses and its serial
number.
6. Press any key to continue. . . The final screen shows the address,
if software addressing was enabled
for the network module.
1310 Diagnostics Menu
6 1310 Network Installation Manual
WT-BASIC Keyword
MAP
The 1310 contains new keywords and system events to support the net-
works. These features will be useful for multi-scale applications or custom-
ized data to be sent to the host device.
The following networks are supported with the MAP keyword:
DeviceNet
TM
ControlNet
TM
InterBus-S
Modbus/TCP
Modbus Plus
Profibus/DP

The map keyword is not required for Ethernet-Raw Sockets since standard
print formats are used.
The map keyword allows the programmer to define their own output
stream to the host device. For example, in a multiscale system, you would
want to map the net weight for all scales instead of the gross, tare, and net
from scale 1 only, as defined the Standard Weigh-Tronix output. The
keyword is described below:
MAP(card#,sclNum,exLoc,intLoc,cmd,I_O[,VAR,Type])
card# Defines the card number for the system. 1 or 2 is used.
sclNum Defines which scale should output its value. 1-8 is used.
exLoc Defines the external memory location to store the information.
IntLoc Defines the internal memory location for the network card.
Cmd Defines the command/system variable to transmit/receive via the
network. See table below for definitions.
I_O Defines if the command is inbound data or outbound data.
1=Inbound, 0=Outbound
VAR Optional argument to send a WT-BASIC variable via the network.
Type Defines the data type for the value to be mapped to the network.
Default data type is 2 or signed integer. See table below.
Type#: Data Type: # of Bytes: Range of Value
0 Signed Char 1
1 Unsigned Char 1
2 Signed Integer 2
3 Unsigned Integer 2
4 Signed Long 4
5 Unsigned Long 4
6 Float 4
7 Double 8
The map keyword allows the user to direct a given system variable to the
network automatically. The system variables that are mapped to the network
are updated at 10Hz, and are transferred via the network.
The external location identifies
the byte in the server where
the data is to be stored.
The internal location identifies
which internal register is used
for the data. Do not leave gaps
between data.
Example: If you have 3 map
commands, you should use
internal locations 1,2,3.
-127 to 127
0 to 255
-32767 to 32767
0 to 65535
-2,147,483,647 to 2,147,483,647
0 to 4,294,967,295
1.0E
-37
to 1.0E
37
2.2E
-308
to 1.7E
308
Type affects the number of
bytes to be stored externally.
7 1310 Network Installation Manual
Transfer rates are:
DeviceNet
TM
125, 250, or 500 KB/sec
ControlNet 5 Mbits/sec
InterBus-S 500 KB/sec
Modbus/TCP 10 Mbits/sec
Modbus Plus 1 Mbits/sec
Profibus/DP 9.6 KB/sec, 19.2 KB/sec, 93.75 KB/sec, 187.5 KB/
sec, 500 KB/sec, 1.5 Mbits/sec, 3 Mbits/sec, 6 Mbits/
sec, 12 Mbits/sec
Ethernet TCP/IP 10 Mbits/sec
The network autobauds to the
slowest node on the network.
Map Command Definitions
Inbound Data to 1310 Command#: Outbound Data from 1310: Command#:
Request Zero 0 Actvalue(Gross=0ADC=13) 0-13
Request Tare 1 Motion 100
Request Print 2 Center of Zero 101
Request Accumulation 3 Actvalue#(Gross=0ADC=13) 102
Set Tare 4 Over/Underload 103
WT-BASIC Variable 5 Current Unit(0=lb, 1=kg) 104
Set Current Units 6 WT-BASIC Variable 105
Reset All Flags 105
Reset Zero Flag 106 zeroFlag 106
Reset Tare Flag 107 tareFlag 107
Reset Print Flag 108 printFlag 108
Reset Accum Flag 109 accumFlag 109
Setpoint Bank (110=1117=8) 110-117 System Counter 175
Fmtprint: (151=1181=32) 151-181 Setpoint Bank (110=1117=8) 110-117
Setpoint: (200=1263=64) 200-263 Setpoint (200=1263=64) 200-263
WT-BASIC Event#(400=1) 400-591 Recall Memory: 1000-9191
(1000=0.9191=8191)
Store Memory: 1000-9191
(1000=0.9191=8191)
WT-BASIC example for 3 scale system transmitting gross weight only:
SUB SYSTEM_STARTUP
Map(1,1,0,0,0,0) map scale#1 gross weight
Map(1,2,2,1,0,0) map scale#2 gross weight
Map(1,3,4,2,0,0) map scale#3 gross weight
END SUB
WT-BASIC example for mapping variables and a remote Zero to the
network:
SUB SYSTEM_STARTUP
Dim wt1
Dim wt2
Map(1,1,0,0,105,0,wt1) map variable wt1
Map(1,1,2,1,105,0,wt2) map variable wt2
Map(1,1,0,0,0,1) map remote zero
END SUB
-1=Reset, 0=inprocess
1=Oper, 2=Abort
ActValue for Commands 0-13
0=Gross
1=Net
2=Tare
3=Min
4=Max
5=ROC
6=Gross Total
7=Net Total
8=Count Total
9=Transaction Count
10=Count
11=Variable
12=Piece Weight
13=A/D Converter Counts
The System Counter command represents a Free Running Counter. It can be used as a watchdog counter to verify
that the indicator is running.
8 1310 Network Installation Manual
When a host is controlling setpoints, events, print formats, or basic scale
functions like zero, tare, certain rules MUST, be followed for proper
functionality.
The following commands will change their value or perform a given function,
if the register that is mapped from the host changes at any time. For ex-
ample, to zero the scale, simply XOR the register mapped for remote zero
with a 1. This will toggle the register every time the XOR is executed, thus
telling the indicator to zero the scale. The commands are as follows:
Remote Zero
Remote Tare
Remote Print
Remote Accumulation
Set Tare Value directly
Set WT-BASIC Variable
Set Current Unit of measure
Toggle Setpoint
Set Setpoint Bank
Store Value to Battery Backed SRAM.
The following commands will change their value or perform a given function,
if the register that is mapped from the host either changes from a 0 to a
nonzero value, or from a nonzero value to another nonzero value. Heres an
example, print format 1 is mapped to register 1024 on the network, setting
that register to 0 will not print, setting it to 1 will force the print format. To
print again, either set the register to 0, then to 1, to force a False to True
transition, or change it from 1, to 2, to cause a nonzero change to the
register. The commands are as follows:
Queue a WT-BASIC Event
Transmit any Print Format
Inbound Memory
Manipulation
WT-BASIC example for mapping different data types to the network in
addition to the WTX Standard I/O.
SUB SYSTEM_STARTUP
map(1,1,14,7,105,0,wt,0) map char variable
map(1,1,15,8,105,0,wt,1) map char variable
map(1,1,16,9,0,0,,2) map gross as integer
map(1,1,18,10,0,0,,3) map gross as unsigned integer
map(1,1,20,11,0,0,,4) map gross as long
map(1,1,24,12,0,0,,5) map gross as unsigned long
map(1,1,28,13,0,0,,6) map gross as float
END SUB
The use of multiple MAP commands may require you to allocate more
memory.
Memory allocation was
changed to 32 Bytes on the
SimPoser Network Configura-
tion tab.
When mapping inbound data,
print Formats and WT-BASIC
events will be queued only
when the register is changed to
a nonzero value. When re-
questing zero or tare, simply
XOR the register with 1 to
issue or reissue a request to
the system.
9 1310 Network Installation Manual
Network Hardware and Installation
DeviceNet
TM
Figure 1
DeviceNet
TM
Module on network interface board
Module shown mounted as Card #1
Device Net
Pluggable Conector (P1)
Pin No. Signal
1 V- (Bus power GND)
2 CAN_LOW
3 Shield
4 CAN_HI
5 V+ (+24VDC)*
* An external power supply will be used to
supply V+ power. Typically this supply will
be previously installed.
P1
10 1310 Network Installation Manual
1. 1310 SimPoser
TM
software.
2. 1310 firmware.
3. Install the DeviceNet
TM
option card module.
4. Interface cable connections listed in the table below.
5. When using RSNetworx
TM
or another network server configuration
software package reference file abs.eds located in SimPoser
TM
. This
file is the hardware profile of the 1310 DeviceNet
TM
Module. The path-
way to this file is C:\wt\1310\Network\abs.eds
6. Launch SimPoser
TM
and select the Configure window
7. Select the Network tab, as shown below.
8. From the Network Type drop box, select DeviceNet.
9. Click the Enable selection so the DeviceNet
TM
network module will be
enabled following a download.
10. Enable the Standard Weigh-Tronix input/output by clicking on the
WTX Standard Output & WTX Standard Input check boxes. This will
enable the standard I/O for the DeviceNet
TM
network. See the table
below for register assignments.
WT Standard Input: WT Standard Output:
0: reqZero 0: Gross
2: reqTare 2: Net
4: reqPrint 4: Tare
6: reqAccum 6: Motion
8: setTare 8: C-Zero
10: setCurrentUnits 10: Actvalue
12: Over/Underload
Setup Requirements
For information on Custom
Data Transfers, see the section
WT-BASIC Keyword MAP.
11 1310 Network Installation Manual
WT Standard Output:
0: Gross
2: Net
4: Tare
6: Motion
8: C-Zero
10: Actvalue
12: Over/Underload
Note: Gross, Net and Tare will
return numeric system values.
Motion and C-zero return a true
(1) or a false (0) condition.
Actvalue returns a number 0-13.
Overload/Underload returns
0=okay, 1=under, 2=over
WT Standard Input:
0: reqZero
2: reqTare
4: reqPrint
6: reqAccum
8: setTare
10: setCurrentUnits
Note: req is motion inhibited set is
not.
Enable software addressing to
bypass hardware switch addressing.
Memory Allocation:
Valid MacID Numbers are 0-63
11. The DeviceNet
TM
card allows for addressing via hardware or software. The dip-switch allows the user to config-
ure the baud rate and the MacID address for the DeviceNet
TM
module PC board. See table below for dip switch
definitions.
The settings above show 500K baud, with a MacID of 1.
ADO = 8
AD1 = 7
AD2 = 6
AD3 = 5
AD4 = 4
AD5 = 3
BD0 = 2
BD1 = 1
Address DIP 3-8
0 000000
1 000001
2 000010
3 000011
. . . . . .
62 111110
63 111111
Baudrate
bit/sec DIP 1-2
125K 00
250K 01
500K 10
Reserved 11
12 1310 Network Installation Manual
Configuration
The MacID address cannot be
changed during operation.
Figure 2
DeviceNet
TM
module
If software addressing is to be used, ALL the dip-switches MUST be set to
ON. The MacID and baud rate for the system can be configured using the
dip switch on the DeviceNet
TM
module PC Board. The MacID can be set in
the range of 0-63. The baud rate can be set to 125KB/sec, 250 KB/sec, or
500 KB/sec. The MacID is read from the switches right after power up, and
they should not be changed during power up.
12. Save this 1310 configuration file and download to the indicator.
Setting the MacID
L
thick
+ 5 X L
thin
= 500 at 125K baud
L
thick
+ 2.5 X L
thin
= 250 at 250K baud
L
thick
+ L
thin
= 100 at 500K baud
where L
thick
is the length of thick cable and L
thin
is
the length of thin cable.
13 1310 Network Installation Manual
Indicators
The DeviceNet
TM
module has two DeviceNet
TM
specific LEDs and two
standard (stacked) indication LEDs mounted on the circuit board. The
functionality of these LEDs are described below:
1. Reserved:
2. DeviceNet
TM
Network Status:
3. DeviceNet
TM
Module Status:
4 Reserved:
LEDs Color Function
LED 3 Steady off No Power
Steady Red Unrecoverable error, re-boot network
Steady Green Module is operational
Flashing Red/Off Minor Fault
LED 2 Steady Off Not powered, not on-line.
Steady Green Module on-line.
Steady Red Critical Link failure, re-boot network.
Flashing Green/Off On-line, but not connected.
Flashing Red/Off Connection TimeOut. Check Cable.
There is also one additional watchdog LED on the DeviceNet
TM
module PC
board. It will blink at 1Hz, if the board has power and the firmware for the
card is functioning properly.
1 2
4 3
LED indicators
For additional network trouble-
shooting information, see the
section 1310 Diagnostics
Menu.
14 1310 Network Installation Manual
ControlNet
TM 1. Install the ControlNet
TM
option card module.
2. BNC cable interface connections shown below.
Module shown mounted as Card #1
Figure 3
1310 ControlNet
TM
module PC board mounted to the
1310 network interface board.
15 1310 Network Installation Manual
3. When using RSNetworx
TM
version 1.x network server configuration
software package reference file abscnt.eds located in SimPoser. This
file is the hardware profile of the 1310 ControlNet
TM
Module. The path-
way to this file is C:\wt\1310\Network\ abscnt.eds.
or
When using RSNetworx
TM
version 2.x network server configuration
software package reference file abscnt.eds located in SimPoser. This
file is the hardware profile of the 1310 ControlNet
TM
Module. The path-
way to this file is C:\wt\1310\Network\ abscntCand.eds
4. Launch SimPoser and select the Configure window.
5. Select the Network tab, as shown below.
6. From the Network Type drop box, select ControlNet.
7. Click the Enable selection so the ControlNet
TM
network module will be
enabled following a download.
8. Enable the Standard Weigh-Tronix input/output by clicking on the
WTX Standard Output & WTX Standard Input check boxes. This will
enable the standard I/O for the ControlNet
TM
network. See the table
below for register assignments.
Note: A two-address offset is required for the inbound memory ad-
dresses for the ControlNet
TM
scanner on the PLC.
For information on Custom
Data Transfers, see the section
WT-BASIC Keyword MAP.
16 1310 Network Installation Manual
WT Standard Output :
3: Gross
4: Net
5: Tare
6: Motion
7: C-Zero
8: Actvalue
9: Over/Underload
Note: Gross, Net and Tare will
return numeric system values.
Motion and C-zero return a true (1)
or a false (0) condition. Actvalue
returns a number 0-13.
Overload/Underload returns
0=okay, 1=under, 2=over
WT Standard Input:
0: reqZero
1: reqTare
2: reqPrint
3: reqAccum
4: setTare
5: setCurrentUnits
Note: req is motion inhibited set is
not.
Enable software addressing to
bypass hardware switch addressing.
Memory Allocation:
Valid MacID Numbers are 1-99
9. The ControlNet
TM
module allows for addressing via hardware or soft-
ware. The rotary switch S1 & S2 allows the user to configure the MacID
address for the ControlNet
TM
module. The switch value on switch S1 is
multiplied by 10(x10) and added to the value of switch S2 (x1). For
example a MacID of 12 would have S1=1 and S2=2. The MacID can be
set in the range of 1-99. The MacID is read from the switches right after
power up, and the setting should not be changed during power up. If
they are changed, a minor fault will be detected and the MacID will not
be recognized until the power is cycled.
WT Standard Input: WT Standard Output:
0: reqZero 3: Gross
1: reqTare 4: Net
2: reqPrint 5: Tare
3: reqAccum 6: Motion
4: setTare 7: C-Zero
5: setCurrentUnits 8: Actvalue
9: Over/Underload
17 1310 Network Installation Manual
Configuration
If software addressing is to be used, both rotary switches MUST be set to 0.
Then the user MUST enable Software addressing in SimPoser and they
need to type in the MacID address for the ControlNet
TM
module.
10. Save this 1310 configuration file and download to the indicator.
The ControlNet
TM
adapter has two ControlNet
TM
specific and two standard
(stacked) indication LEDs mounted on the circuit board. The functionality of
these LEDs are described below:
1. Module Status:
2. LED Channel A:
3. LED Channel B:
4. Module Owned:
Figure 5
1310 ControlNet
TM
Module PC board
The MacID address cannot be
changed during operation.
Setting the MacID
Figure 4
Indicators
1 2
4 3
For additional network trouble-
shooting information, see the
section 1310 Diagnostics
Menu.
18 1310 Network Installation Manual
Channel LEDs Color Function
LED 2 AND 3 Steady off Module not initialized.
Steady Red Faulted unit, must reboot
or repair
Alternating Red/Green Self test of bus controller
Flashing Red/Off Incorrect configuration,
duplicate MacID..
LED 2 OR 3 Steady Off Channel is disabled
Steady Green Normal operation of
Channel
Flashing Green/Off Temporary errors (Chan
nel will self correct) or
Channel is not configured
to go online
Flashing Red/Off Media fault or no other
MacIDs on the network
Flashing Red/Green Incorrect Network con
figuration
Module Status Color Function
LED
LED 1 Flashing Green Module is waiting for
initialization
Steady Green Module is initialized
Flashing Red Minor fault, MacID has
been changed after
initialization
Steady Red: Major fault, module must
be restarted
Module Owned Color Function
LED
LED 4 Steady Green A connection is opened
against the ControlNet
TM
adapter
Off Module is initialized
There is also one additional watchdog LED on the ControlNet
TM
adapter PC
board. It will blink at 1Hz, if the board has power and the firmware for the
card is functioning properly.
19 1310 Network Installation Manual
Setup requirements:
1. Install the InterBus-S
TM
option card module.
2. Interface cable connections listed in the table below.
InterBus-S
TM
Interface
Module shown mounted as card number two.
Figure 6
InterBus-S Module mounted to the
1310 network interface board
Interbus-S
TB82
(Bus Out) DB-9 Male
Pin No. Signal Pin No. Signal
1 PE Housing
2 GND
3 NC
4 RBST 9 RBST
5 NC
6 GND 3, 5 GND
7 /DI2 7 /DI2
8 /DO2 6 /DO2
9 DI2 2 DI2
10 DO2 1 DO2
Interbus-S
TB80
(Bus IN) DB-9 Female
Pin No. Signal Pin No. Signal
1 PE Housing
2 DO1 1 DO1
3 DI1 2 DI1
4 /DO1 6 /DO1
5 /DI1 7 /DI1
6 GND 3 GND
7 NC
8 NC
9 NC
10 NC
TB82
TB80
20 1310 Network Installation Manual
3. Launch SimPoser
TM
and select the Configure window
4. Select the Network tab, as shown below.
5. From the Network Type drop box, select InterBus-S.
6. Click the Enable selection so the InterBus-S network module will be
enabled following a download.
7. Enable the Standard Weigh-Tronix input/output by clicking on the
WTX Standard Output & WTX Standard Input check boxes. This will
enable the standard I/O for the InterBus-S network. See the table below
for register assignments.
WT Standard Input: WT Standard Output:
0: reqZero 0: Gross
2: reqTare 2: Net
4: reqPrint 4: Tare
6: reqAccum 6: Motion
8: setTare 8: C-Zero
10: setCurrentUnits 10: Actvalue
12: Over/Underload
For information on Custom
Data Transfers, see the section
WT-BASIC Keyword MAP.
21 1310 Network Installation Manual
WT Standard Output:
0: Gross
2: Net
4: Tare
6: Motion
8: C-Zero
10: Actvalue
12: Over/Underload
Note: Gross, Net and Tare will
return numeric system values.
Motion and C-zero return a true
(1) or a false (0) condition.
Actvalue returns a number 0-13.
Overload/Underload returns
0=okay, 1=under, 2=over
WT Standard Input:
0: reqZero
2: reqTare
4: reqPrint
6: reqAccum
8: setTare
10: setCurrentUnits
Note: req is motion inhibited
set is not.
Memory Allocation:
Configuration
Figure 7
InterBus-S module
8. The InterBus-S module has NO addressing via hardware or software.
The InterBus-S MASTER DEVICE will automatically detect every
module or slave device connected to the network.
9. Save this 1310 configuration file and download to the indicator.
22 1310 Network Installation Manual
The InterBus-S module has four InterBus-S specific LEDs. The functionality
of these LEDs are described below:
1. RBDA: Remote Bus DisAble
(Active RED when out going remote bus is switched OFF).
2. TR: Transmit/Receive
(Active GREEN when PCP communication is carried out over the
InterBus)
3. CC:Cable Check
(Active GREEN if the cable connection is good and the InterBus master
is not in RESET).
4. BA: Bus Active
(Active Green, is monitoring Layer 2).
5. UL: Voltage OKAY at the Interface
(Active GREEN if the voltage is okay).
1 2
5 4 3
LED
Indicators
Indicators
There is also one additional watchdog LED on the InterBus-S module PC
board. It will blink at 1Hz, if the board has power and the firmware for the
card is functioning properly.
Figure 8
InterBus-S LED indicators
For additional network trouble-
shooting information, see the
section 1310 Diagnostics
Menu.
23 1310 Network Installation Manual
Setup requirements:
1. Install the Modbus/TCP Ethernet option card module.
2. Interface cable connections for TB-77 and TB-80 listed in the table
below.
Modbus/TCP Ethernet
TB77 RJ45 DB-9 Female
TB80
Pin No. Signal Pin No. Signal Pin No. Signal
1 GND --- --- --- ---
2 NC --- --- --- ---
3 NC --- --- --- ---
4 NC --- --- --- ---
5 TD+ 1 TD+ 8 TD+
6 TD- 2 TD- 3 TD-
7 RD+ 3 RD+ 7 RD+
8 NC --- --- --- ---
9 RD- 6 RD- 2 RD-
10 NC --- --- --- ---
Modbus/TCP Ethernet
Interface
Pinouts for
RJ45 Connector
Pin 8
Pin 1
Modbus/TCP Hardware is the
same for Ethernet-Raw Sock-
ets in the indicator.
If you do not get an indication of a connection to the indicator, you
may have to swap TD+ & RD+, and TD- & RD- locations.
24 1310 Network Installation Manual
Figure 9
Modbus/TCP Ethernet Module mounted to the
1310 network interface board.
3. Launch SimPoser and select the Configure window.
4. Select the Network tab, as shown below.
5. Select Modbus/TCP from the Network Type drop box.
6. Click the Enable selection so the Modbus/TCP Ethernet network
module will be enabled following a download.
Module shown mounted as card number one.
TB77 TB80
25 1310 Network Installation Manual
WT Standard Output :
40001: Gross
40002: Net
40003: Tare
40004: Motion
40005: C-Zero
40006: Actvalue
40007: Over/Underload
Note: Gross, Net and Tare will
return numeric system values.
Motion and C-zero return a true
(1) or a false (0) condition.
Actvalue returns a number 0-13.
Overload/Underload returns
0=okay, 1=under, 2=over
WT Standard Input:
1025 or 41025: reqZero
1026 or 41026: reqTare
1027 or 41027: reqPrint
1028 or 41028: reqAccum
1029 or 41029: setTare
1030 or 41030: setCurrentUnits
Note: req is motion inhibited,
set is not.
Enable software addressing to
bypass hardware switch addressing. Memory Allocation:
IP Addressing
SUBNET mask
Gateway
For information on Custom
Data Transfers, see the section
WT-BASIC Keyword MAP.
7. Enable the Standard Weigh-Tronix input/output by clicking on the
WTX Standard Output & WTX Standard Input check boxes. This will
enable the standard I/O for the Modbus/TCP Ethernet network. See the
table below for register assignments.
WT Standard Input: WT Standard Output:
1025 or 41025: reqZero 40001: Gross
1026 or 41026: reqTare 40002: Net
1027 or 41027: reqPrint 40003: Tare
1028 or 41028: reqAccum 40004: Motion
1029 or 41029: setTare 40005: C-Zero
1030 or 41030: setCurrentUnits 40006: Actvalue
40007: Over/Underload
26 1310 Network Installation Manual
The Modbus/TCP Ethernet module allows for addressing via hardware or
software.
Dip-Switch S1, configures the last byte of the IP address. The IP address
will be 192.168.0.X, where X is the value of the S1.
S1-8 is the Least Significant Bit(LSB) and S1-1 is the Most Significant
Bit(MSB).
The SUBNET mask is 255.255.255.0 and the Gateway is 0.0.0.0. The
valid address range for S1 is 1-255.
If SOFTWARE ADDRESSING is to be used, ALL the switches on S1 MUST
be set to OFF. IP address, SUBNET mask, and Gateway are all config-
urable via SimPoser, when software addressing is enabled.
Configuration
Figure 10
Modbus/TCP Ethernet Module
8. Save the 1310 configuration file and download to the indicator.
The Modbus/TCP Ethernet module has four fieldbus specific LEDs mounted
on the circuit board. The functionality of these LEDs are described below:
Indicators
1 2
4 3
LED indicators
S-1
For additional network trouble-
shooting information, see the
section 1310 Diagnostics
Menu.
27 1310 Network Installation Manual
LED # Color Function
1 Green Indicates the module is connected to an Ethernet
network:
2 Green Flash at 1 Hz. Indicates that the used IP address
is not set by the value on the dip-switches
Red Flash at 1-Hz. The Ethernet MAC address is not
correct.
Red Flash at 2 Hz. The Module failed to load the
Ethernet configuration from the flash.
Red Flash at 4 Hz. Internal Error.
3 Green No activity
OFF Flashes from green to off when a packet is
received or transmitted.
4 Green The number of flashes indicates the number of
connections established to the Modbus/TCP
module. (Ex. If 3 connections are established,
then this LED flashes 3 times, then it is off for a
short period of time, and then it flashes 3 more
times).
There is also one additional watchdog LED on the Modbus/TCP Ethernet
module PC board. It will blink at 1Hz, if the board has power and the firm-
ware for the card is functioning properly.
28 1310 Network Installation Manual
Modbus Plus Interface
Setup requirements:
1. Install the Modbus Plus option card module.
2. Interface cable connections for TB-77 and TB-80 are listed in the table
below.
Module shown mounted as card number one.
Figure 11
Modbus Plus Module mounted to the
NetWork Interface board
Modbus Plus
TB77
TB80 DB-9 Female
Pin No. Signal Pin No. Signal
1 PE Housing
2 NC
3 NC
4 NC
5 NC
6 Line A 3 Line A
7 NC
8 NC
9 Line B 2 Line B
10 Shield 1 Shield
TB77 TB80
29 1310 Network Installation Manual
3. Launch SimPoser and select the Configure window.
4. Select the Network tab, as shown below.
5. Select Modbus Plus from the Network Type drop box.
6. Click the Enable selection so the Modbus Plus network module will be
enabled following a download.
7. Enable the Standard Weigh-Tronix input/output by clicking on the
WTX Standard Output & WTX Standard Input check boxes. This will
enable the standard I/O for the Modbus Plus network. See the table
below for register assignments.
WT Standard Input: WT Standard Output:
41025: reqZero 40001: Gross
41026: reqTare 40002: Net
41027: reqPrint 40003: Tare
41028: reqAccum 40004: Motion
41029: setTare 40005: C-Zero
41030: setCurrentUnits 40006: Actvalue
40007: Over/Underload
For information on Custom
Data Transfers, see the section
WT-BASIC Keyword MAP.
30 1310 Network Installation Manual
WT Standard Output :
40001: Gross
40002: Net
40003: Tare
40004: Motion
40005: C-Zero
40006: Actvalue
40007: Over/Underload
Note: Gross, Net and Tare will
return numeric system values.
Motion and C-zero return a true
(1) or a false (0) condition.
Actvalue returns a number 0-13.
Overload/Underload returns
0=okay, 1=under, 2=over
WT Standard Input:
41025: reqZero
41026: reqTare
41027: reqPrint
41028: reqAccum
41029: setTare
41030: setCurrentUnits
Note: req is motion inhibited set
is not.
Enable software addressing to
bypass hardware switch addressing.
Memory Allocation
Valid node numbers are 1-64
8. The Modbus Plus module PC board allows for addressing via hardware
or software. The dip-switches allows the user to configure the Host
source device address and the Node address for the Modbus Plus
module PC board.
Dip-switch S2 MUST BE USED to configure the Host source address.
Dip-switch S2-6 is the LSB of the address and S2-1 is the MSB.
Dip-switch S1 configures the Node address for the Modbus Plus mod-
ule. Dip-switch S1-6 is the LSB of the address and S1-1 is the MSB.
If SOFTWARE NODE ADDRESSING for the Modbus Plus Module is to
be used, ALL the dip-switches on S1 MUST be set to OFF.
31 1310 Network Installation Manual
Configuration
Node address S1
The node address cannot be
changed during operation.
Host Source ID (address) S2
The Host source address
cannot be changed during
operation.
1310 Modbus Plus Module
The Modbus Plus module uses one node address from 1-64 to configure the
address it will extract the global data from, sent during the token pass. The
Node address on the Modbus Plus module is set before power on. Any
changes of the Node address while power is on will not be valid until the
next power cycle.
The address is set in binary format.
1 2 3 4 5 6 Function
MSB LSB
ON ON ON ON ON ON Node address set to 1
ON ON ON ON ON OFF Node address set to 2
ON ON ON ON OFF ON Node address set to 3
- - - - - - N/A
OFF OFF OFF OFF OFF ON Node address set to 63
OFF OFF OFF OFF OFF OFF Node address set to 64
The Modbus Plus module uses one Host address from 1-64 to configure the
address it will extract the global data from, sent during the token pass.
The host address is set in binary format.
1 2 3 4 5 6 Function
MSB LSB
ON ON ON ON ON ON Host address set to 1
ON ON ON ON ON OFF Host address set to 2
ON ON ON ON OFF ON Host address set to 3
- - - - - - N/A
OFF OFF OFF OFF OFF ON Host address set to 63
OFF OFF OFF OFF OFF OFF Host address set to 64
9. Save the 1310 configuration file and download to the indicator.
S-1 S-2
32 1310 Network Installation Manual
The Modbus Plus module has two fieldbus specific LEDs and two standard
(stacked) indication LEDs mounted on the circuit board. The functionality of
these LEDs are described below:
1. Not used N/A
2. ERROR This LED indicates that the communication is NOT OK!
(Active Red)
3. Active MBP This diagnostic LED flashes in different patterns de-
pending on the module status. (See the table below)
4. MBP Init This LED indicates if the per interface is initialized
(Active SOLID Green)
LED # Color Function
3. MBP Active LED Green Indicating different Node Status:
Flash every 160 mS
This node works normal, receiving and
passing token
Flash every 1-Sec.
This node is in MONITOR OFF_LINE state
2 Flashes, then OFF 2 Sec.
This node is in MAC_IDLE, never-getting-
token state
3 Flashes, then OFF 1.7 Sec.
This node not hearing in any other nodes.
2 Flashes, then OFF 1.4 Sec.
This node has heard a valid packet that has
a duplicated-node-address sent from
another node on the network, using the
same Node ID.
There is also one additional watchdog LED on the Modbus Plus module PC
board. It will blink at 1Hz, if the board has power and the firmware for the
card is functioning properly.
Indicators
1 2
4 3
LED indicators
For additional network trouble-
shooting information, see the
section 1310 Diagnostics
Menu.
33 1310 Network Installation Manual
PROFIBUS-DP
Setup requirements:
1. Install the Profibus

option card module.


2. Cable interface connections to TB77 & TB80 shown below.
* +5V and GND are used for bus termina-
tion and optical transceivers. RTS is
used by some equipment to determine
the direction of the transmission.
ProfiBus-DP
TB77
TB80 DB-9 Female
Pin No. Signal Pin No. Signal
1 Shield Housing
2 GND* 5 GND*
3 RTS* 4 RTS*
4 NC
5 A-LINE TX/RX 8 A-LINE
6 BPLINE RX/TX 3 B-LINE
7 NC
8 +5V BUS* 6 +5V BUS*
9 NC
10 NC
Module shown mounted
as card number one.
TB77 TB80
Figure 12
1310 Profibus
TM
Module PC board
3. When configuring the Profibus

network via the network server configu-


ration software package, reference file profibus.gsd installed with the
SimPoser. This file is the hardware profile of the 1310 Profibus

Module.
The pathway to this file is C:\wt\1310\Network\ profibus.gsd
4. Launch SimPoser
TM
and select the Configure window.
34 1310 Network Installation Manual
5. Select the Network tab, as shown below.
6. From the Network Type drop box, select ProfiBus DP.
7. Click the Enable selection so the Profibus

network module will be


enabled following a download.
8. Enable the Standard Weigh-Tronix input/output by clicking on the
WTX Standard Output & WTX Standard Input check boxes. This will
enable the standard I/O for the Profibus

network. See the table below


for register assignments.
WT Standard Input: WT Standard Output:
0: reqZero 0: Gross
1: reqTare 1: Net
2: reqPrint 2: Tare
3: reqAccum 3: Motion
4: setTare 4: C-Zero
5: setCurrentUnits 5: Actvalue
6: Over/Underload
For information on Custom
Data Transfers, see the section
WT-BASIC Keyword MAP.
35 1310 Network Installation Manual
Configuration
WT Standard Output :
0: Gross
1: Net
2: Tare
3: Motion
4: C-Zero
5: Actvalue
6: Over/Underload
Note: Gross, Net and Tare will
return numeric system values.
Motion and C-zero return a true
(1) or a false (0) condition.
Actvalue returns a number 0-13.
Overload/Underload returns
0=okay, 1=under, 2=over
WT Standard Input:
0: reqZero
1: reqTare
2: reqPrint
3: reqAccum
4: setTare
5: setCurrentUnits
Note: req is motion inhibited set is
not.
Enable software addressing to
bypass hardware switch addressing.
Memory Allocation
Valid node numbers are 1-99
Setting the Node 9. The Profibus

module allows for addressing via hardware or software.


The rotary switch S1 & S2 allows the user to configure the Node ad-
dress for the Profibus

module.
The switch value on switch S1 is multiplied by 10(x10) and added to the
value of switch S2(x1). For example a Node of 12 would have S1=1 and
S2=2. The Node can be set in the range of 1-99.
The Node is read from the switches right after power up, and the setting
should not be changed during power up.
The last node of the Profibus

network MUST be terminated to avoid


reflections on the bus line. Switch S3 is the TERMINATION switch.
When the module is used as the first or the last module in a network the
termination switch must be ON. Otherwise switch S3 has to be in the
OFF position.
If software addressing is to be used, both rotary switches MUST be
set to 0, then the user MUST enable Software addressing in SimPoser
and then type in the Node address for the Profibus

module.
The module has an AUTO baud rate detection function that detects the
current setting of the master. The following baud rates are supported by
the Profibus

module:
36 1310 Network Installation Manual
The Profibus

adapter has four Profibus

specific indication LEDs mounted


on the circuit board. The functionality of these LEDs are described below:
1. Not Used:
2. On-Line LED:
3. Off-Line LED:
4. Fieldbus diagnostics:
Indicators
1 2
4 3
S-3 S1 S-2
The Node address cannot be
changed during operation. If
an external termination
connector is used then S3
must be in the OFF position.
9.6 Kbits 1.5 Mbits
19.2 Kbits 3.0 Mbits
93.75 Kbits 6.0 Mbits
187.5 Kbits 12.0 Mbits
500.0 Kbits
10. Save this 1310 configuration file and download to the indicator.
For additional network trouble-
shooting information, see the
section 1310 Diagnostics
Menu.
S-1 S-2 S-3
37 1310 Network Installation Manual
LEDs Color Function
LED 2 Green ON On-Line and data exchange is
possible.
OFF Off-Line
LED 3 RED ON Off-Line and no data exchange
is possible.
OFF On-Line
LED 4 Red - ON Indicates certain faults on the
Fieldbus side.
Red -
Flashing 1Hz Error in configuration: IN and /
or OUT length set during
initialization of the module is
not equal to the length set
during configuration of the
network
Red
Flashing 4Hz Error in the initialization of the
Profibus

communication
ASIC.
OFF Okay
There is also one additional watchdog LED on the Profibus

module PC
board. It will blink at 1Hz, if the board has power and the firmware for the
card is functioning properly.
38 1310 Network Installation Manual
Ethernet TCP/IP
Raw Sockets
Modbus/TCP Hardware is the
same for Ethernet-Raw Sock-
ets in the indicator.
Setup requirements:
1. Install the Ethernet option card module.
2. Interface cable connections for TB-77 and TB-80 listed in the table
below.
Pinouts for
RJ45 Connector
Pin 8
Pin 1
Ethernet TCP/IP Raw Sockets
TB77 RJ45
TB80
Pin No. Signal Pin No. Signal
1 GND --- ---
2 NC --- ---
3 NC --- ---
4 NC --- ---
5 TD+ 1 TD+
6 TD- 2 TD-
7 RD+ 3 RD+
8 NC --- ---
9 RD- 6 RD-
10 NC --- ---
If you do not get an indication of a connec-
tion to the indicator, you may have to swap
TD+ & RD+, and TD- & RD- locations.
39 1310 Network Installation Manual
Module shown mounted as card number one.
TB77 TB80
Ethernet-Raw Sockets Module mounted to
the 1310 network interface board
3. Launch SimPoser and select the Configure window.
4. Select the Network tab, as shown below.
5. Select Ethernet-Raw Sockets from the Network Type drop box.
6. Click the Enable selection so the Ethernet-Raw Sockets network
module will be enabled following a download.
40 1310 Network Installation Manual
TCP/IP Socket# to use.
TCP/IP Port# to use.
Note: Software Addressing is
automatically enabled.
Host IP Address.
IP Addressing
SUBNET mask
Gateway
End of Message Character to queue
SOCK1_MESSAGE or
SOCK2_MESSAGE event handler.
The Ethernet-Raw Sockets
module allows for software
addressing ONLY. Dip-
Switch S1, MUST be config-
ured so ALL the switches on
S1 are set to OFF.
7. Select the Host IP address for which the 1310 is to log onto.
8. Select which Socket and Port to connect on.
9. Select the End of Message character, which will queue the
Sock1_Message event when it is received, or Sock2_Message, depend-
ing on which card, #1 or #2, is used or enabled.
10. Save the 1310 configuration file and download to the indicator.
S-1
41 1310 Network Installation Manual
WT-BASIC Keywords
and Events
Ethernet-Raw Sockets Events
The new keywords and events for this option are also defined below along
with a sample application to demonstrate the basic functionality of the
Ethernet-Raw Sockets option.
SUB SOCKx_MESSAGE
This event will be queued when the EOM character is received over the
Ethernet network. The x represents the card number that has been selected.
SUB NETx_OFFLINE
When the network cable is damaged or disconnected, the network goes
offline and this event will be queued. The x represents the card number that
has been selected.
SUB NETx_ONLINE
When the network cable is connected, the network goes online and this
event will be queued. The x represents the card number that has been
selected.
SUB SOCKx_OFFLINE
When the server is shut down, or the connection is lost to the server. The
socket goes offline, and this event will be queued. The x represents the card
number that has been selected.
SUB SOCKx_ONLINE
When the server makes a connection to the socket specified, the network
goes online, and this event will be queued. The x represents the card
number that has been selected.
SUB NETWORK_ABORT
If the initialization procedure fails on power up, this event is queued. NetErr
will contain the error corresponding to the failure.
SUB NETWORK_OPER
If the initialization procedure succeeds on power up, this event it queued.
NetErr will be set to 0.
42 1310 Network Installation Manual
Ethernet-Raw
Sockets Keywords
GETSOCK$(x):
This keyword allows the user to fetch a message from the receive buffer for
the Ethernet option. GetSock will return all characters up to and including
the End of Message character, outlined on the SimPoser network configura-
tion tab.
Syntax:
SUB SOCK1_MESSAGE
Msg$=getSock$(1)
END SUB
NETERR(x):
This keyword returns the status of the network and returns the last error to
have occurred on the network.
NetErr Values:
0 = Network Online and functioning.
1 = Network not enabled in the configuration.
2 = The network card installed does not match the SimPoser configuration.
3 = Initialization Failed.
4 = The Network has gone offline.
Syntax:
SUB NET1_OFFLINE
Dipsmode=6
Cls
Print Network Error: ;neterr(1)
Print Please call your service technician
END SUB
CLEARERR(2) or CLEARERR(3):
This keyword will reset neterr to 0. ClearErr(2) is for card #1, ClearErr(3) is
for card #2.
Syntax:
SUB NET1_ONLINE
ClearErr(2) clear card#1 error, network online again.
END SUB
SOCKSTAT(x):
This keyword returns the status of the network and returns the number
which represents this status. The x represents the card number that has
been selected.
Syntax:
SUB SOCK1_OFFLINE
Dipsmode=6
Cls
Print Socket Error: ;sockstat(1)
Print Please call your service technician
END SUB
SOCKSTAT values:
0 = Not Active 1 = Listening
2 = Connecting(OFFLINE) 3 = Connected(ONLINE)
4 = Connection Refused 5 = Connection TimeOut
6 = Connection Failed
SOCKERR(x):
This keyword returns the last socket error that has occurred. The x repre-
sents the card number that has been selected.
Syntax:
SUB SOCK1_OFFLINE
43 1310 Network Installation Manual
Example Program
Dipsmode=6
Cls
Print Socket Error: ;sockerr(1)
Print Please call your service technician
END SUB
SOCKERR values:
1= Invalid IP-address or SUBNET mask. 2 = Invalid socket type
3= No free socket 4 = Invalid socket
5 = Not connected 6 = Command Failed
7 = Invalid data size 8 = Invalid fragment type
9 = Fragment Error 10 = Invalid timeout time
11 = Cant send more
SUB SYSTEM_STARTUP
dispmode=40
settimer(2,0.5) twice a second transmission.
END SUB
SUB SYSTEM_TIMER2
Call SendGross1
END SUB
continuous output of the gross weight.
demonstrates serial print and ethernet print
SUB SENDGROSS1
IF NOT MOTION THEN
msg$ = G +format$(gross,6.2)+ lb+chr$(13)
else
msg$ = G +format$(gross,6.2)+ lb M+chr$(13)
END IF
print #52, msg$ print msg$ out card#1, socket#2
END SUB
subroutine to emulate keypresses on the
front panel via ethernet or serial port
SUB PROCESSCOM
If left$(msg$,3)=!F1" then
CALL f1_KEY
ELSEIf left$(msg$,3)=!F2" then
CALL f2_KEY
ELSEIf left$(msg$,3)=!F3" then
CALL f3_KEY
ELSEIf left$(msg$,3)=!F4" then
CALL f4_KEY
ELSEIf left$(msg$,3)=!F5" then
CALL f5_KEY
ELSEIf left$(msg$,3)=!SK then
DoSelect
ELSEIf left$(msg$,3)=!UK then
DoUnits
ELSEIf left$(msg$,3)=!PK then
DoPrint
ELSEIf left$(msg$,3)=!TK then
DoTare
ELSEIf left$(msg$,3)=!ZK then
DoZero
Else
44 1310 Network Installation Manual
Indicators
The Ethernet module has four LEDs mounted on the circuit board. The
functionality of these LEDs are described below:
1310 Ethernet Module
For additional network trouble-
shooting information, see the
section 1310 Diagnostics
Menu. 4 3
LED Indicators
Cls
Msg$=left$(msg$,len(msg$)-1) remove EOM character
Print msg$
End if
End Sub
socket#1 parser
SUB SOCK1_MESSAGE
Beep
msg$=getsock$(1)
CALL ProcessCom
END SUB
SUB SOCK1_OFFLINE
Cls
Print Socket Offline
END SUB
SUB SOCK1_ONLINE
Cls
Print Socket Online
END SUB
45 1310 Network Installation Manual
1 2
LEDs Color Function
1 Green Indicates the module is connected to an Ethernet
network:
2 Green Flash at 1 Hz
Indicates that the used IP address is not set by
the value on the dip-switches
Red Flash at 1-Hz.
The Ethernet MAC address is not correct.
Red Flash at 2 Hz.
The Module failed to load the Ethernet configura-
tion from the flash.
Red Flash at 4 Hz
Internal Error.
3 Green No activity
OFF Flashes from green to off when a packet is
received or transmitted.
4 Green The number of flashes indicates the number of
connections established to the Ethernet module.
(Ex. If 3 connections are established, then this
LED flashes 3 times, then it is off for a short
period of time, and then it flashes 3 more times).
There is also one additional watchdog LED on the Ethernet module PC
board. It will blink at 1Hz, if the board has power and the firmware for the
card is functioning properly.
46 1310 Network Installation Manual
Ethernet-IT (Internet
protocol suite - HTTP,
SMTP, FTP)
Setup requirements:
1. Install the Ethernet-IT option card module.
2. Interface cable connections for TB-77 and TB-80 listed in the table
below.
Pinouts for
RJ45 Connector
Pin 8
Pin 1
Ethernet-IT
TB77 RJ45
TB80
Pin No. Signal Pin No. Signal
1 GND --- ---
2 NC --- ---
3 NC --- ---
4 NC --- ---
5 TD+ 1 TD+
6 TD- 2 TD-
7 RD+ 3 RD+
8 NC --- ---
9 RD- 6 RD-
10 NC --- ---
If you do not get an indication of a connec-
tion to the 1310, you may have to swap TD+
& RD+, and TD- & RD- locations.
47 1310 Network Installation Manual
Module shown mounted as card number one.
TB77 TB80
Ethernet-IT Module mounted to
the 1310 network interface board
3. Launch SimPoser and select the Configure window.
4. Select the Network tab, as shown below.
5. Select Ethernet-IT from the Network Type drop box.
6. Click the Enable selection so the Ethernet-IT network module will be
enabled following a download.
48 1310 Network Installation Manual
Note: Software Addressing is
automatically enabled.
SMTP Server IP Address
IP Address
SUBNET mask
Gateway
The Ethernet-ITmodule
allows for software address-
ing ONLY. Dip-Switch S1,
MUST be configured so ALL
the switches on S1 are set to
OFF.
7. Select the SMTP Server IP address for the mail server the 1310 will be
connected to.
8. Write the application software to use the Ethernet-IT features.
9. Save the 1310 configuration file and download to the indicator.
S-1
49 1310 Network Installation Manual
10/100Mb Ethernet
Keywords
File System Keywords:
The 1310 indicators 10/100Mb Ethernet option card has a file system, which
allows applications to read, write, and delete files. These files can be used
for HTML code, data, or error logs. An email maybe sent, to notify someone
of errors, or that data is ready to be extracted.
FOPEN(fileName$,mode[,boardNum])
This keyword allows the programmer to create/open a file on the Ethernet
10/100Mb option board. You may open the file, open it for read only pur-
poses, or open it as append(write access, in addition to what is already in
the file). This keyword MUST be issued prior to using a print formats whose
destination ports are set to 70 & 80.
Syntax: handle = fopen(fileName$,mode)
handle = numeric return value used for further file operations
FileName$ = This is the name of the file you wish to create a file
handle for.
Mode = Type of File access
Mode Values:
0=open existing file for reading
1=open new file for writing
2=open existing file for appending
BoardNum = an optional argument that tells the system which board
to access, default=1.
BoardNum Values:
1=Card 1
2=Card 2
FREAD(fileName$,size,strLoc[,boardNum])
This keyword allows the programmer to read data from the Ethernet 10/
100Mb option board. You may open the file for read access, then issue the
fread keyword to read data from the file. This is useful when a remote server
places a data file via FTP in the indicator. You can then read the data and
set target weights, piece weights, load local database values, etc.
Syntax: fread(handle,size,strLoc)
Handle = This is the file handle generated by the fopen keyword.
Size = The size of the string you wish to read in.
StrLoc = The location in store/recall memory to store the string you
are reading from the file.
BoardNum = an optional argument that tells the system which board
to access, default=1.
BoardNum Values:
1=Card 1
2=Card 2
After fread is called, the fsize keyword holds the number of characters read,
if the file is less than the number requested the end of the file has been
reached. The ferror keyword holds the value of any error that occurred in the
read (0 = success)
If you are connecting to the
1310 via web browser, such as
Microsoft Internet Explorer

, do
the following to be sure you
are getting current information,
not cached information.
Under Tools>Internet Options>
General>Temporary Internet
files>Settings:
Set Check for newer ver-
sions of stored pages from
Automatically to Every visit
to the page.
If you use another browser,
follow the steps necessary to
turn off the page caching
option.
50 1310 Network Installation Manual
FWRITE(handle, size,strLoc[,boardNum])
This keyword allows the programmer to write data to the Ethernet10/100Mb
option board. You may open the file for append access, then issue the
fwrite keyword, or call a print format whose destination port is directed to
Port 70 & 80. Data will appear in the file that you specify. Port 70 will create
a file handle for card 1. Port 80 will create a file handle for card 2. Data,
HTML code, or error logs can be generated using these keywords.
Syntax: fwrite(handle,size,strLoc) or fmtprint(1)
Handle = This is the file handle generated by the fopen keyword.
Size = The size of the string you wish to write to disk.
Strloc = Store/recall location for the string you wish to send to the
file.
BoardNum = an optional argument that tells the system which board
to access, default=1.
BoardNum Values:
1=Card 1
2=Card 2
After fwrite is called, the fsize keyword holds the number of characters
written. The ferror keyword holds the value of any error that occurred in the
read (0 = success)
FCLOSE(handle[,boardNum])
This keyword allows the programmer to close a given file on the Ethernet
10/100Mb option board. You will use the file handle generated by the fopen
keyword.
Syntax: fclose(handle)
Handle = This is the file handle generated by the fopen keyword.
BoardNum = an optional argument that tells the system which board
to access, default=1.
BoardNum:
1=Card 1
2=Card 2
The ferror keyword holds the value of any error that occurred in the read (0
= success)
FDELETE(fileName$[,boardNum])
This keyword allows the programmer to delete a given file on the Ethernet
10/100Mb option board. You will use the file name that was used by the
fopen keyword. To delete the file, it must not be open. If the file has been
opened, issue the fclose command before deleting the file. The ferror
keyword holds the value of any error that occurred in the read (0 = success)
51 1310 Network Installation Manual
FERROR
This keyword returns the most recent error from a file access. This keyword
is not card specific.
Syntax: fileError = ferror
Errors:
0=success
1=invalid IP address or subnet mask
3=no free socket
12=failed to open file or file not found
13=Invalid file handle or filename
14=invalid open mode
15=no email server configured
FSIZE
This keyword returns the most recent number of bytes read from or written
to a file from a read or write operation. It also holds the size of a file just
after it is opened.
Syntax: fileSize = fsize
SENDMAIL(to$,from$,subject$,textBody$)
This keyword allows the programmer to send an email via an SMTP server.
The SMTP servers address is configured via the SimPoser Configuration,
or the setnet keyword. This address must be an IP address. To determine
the IP address of a named mail server ping the server from a computer (e.g.
ping mail.wtx.com) and use the IP address displayed.
Syntax:
mailError = sendmail(don@hotmail.com,1310@weigh-
tronix.com,Errors Present,Goto http://1310.1.com/errorlog.htm)
mailError = any error that occurred during the mail send.
mailError:
0=success
1=invalid IP address or subnet mask
3=no free socket
15=no email server configured
to$ = the email address of the recipient
from$ = the email address of the sender, also used as the reply-to
address in case anyone replies to the email message. This ideally is set
to someones email address that should receive any replies. The 1310
will not receive emails.
subject$ = The subject of the email
textBody$ = The body of the email. As shown in the example, this can
be a hyperlink to a web page in the scale indicator that contains more
details for the message.
TIMER
This command returns the number of seconds (in hundredths) since mid-
night of the current day.
UNIXTIME
This command returns the number of seconds (in hundredths) since mid-
night January 1, 1970.
E-Mail Keywords
52 1310 Network Installation Manual
Ethernet-IP
Pinouts for
RJ45 Connector
Pin 8
Pin 1
Setup requirements:
1. Install the Ethernet-IP option card module.
2. Interface cable connections for TB-77 and TB-80 listed in the table
below.
Ethernet-IP
TB77 RJ45 DB-9 Female
TB80
Pin No. Signal Pin No. Signal Pin No. Signal
1 GND --- --- --- ---
2 NC --- --- --- ---
3 NC --- --- --- ---
4 NC --- --- --- ---
5 TD+ 1 TD+ 8 TD+
6 TD- 2 TD- 3 TD-
7 RD+ 3 RD+ 7 RD+
8 NC --- --- --- ---
9 RD- 6 RD- 2 RD-
10 NC --- --- --- ---
53 1310 Network Installation Manual
Module shown mounted as card number one.
TB77 TB80
Ethernet-IP Module mounted to
the 1310 network interface board
3. Launch SimPoser and select the Configure window.
4. Select the Network tab, as shown below.
5. Select Ethernet-IP from the Network Type drop box.
6. Click the Enable selection so the Ethernet-IP network module will be
enabled following a download.
54 1310 Network Installation Manual
7. Enable the Standard Weigh-Tronix input/output by clicking on the
WTX Standard Output & WTX Standard Input check boxes. This will
enable the standard I/O for the Ethernet-IP network. See the table below
for register assignments.
WT Standard Input: WT Standard Output:
Word0: reqZero Word0: Gross
Word1: reqTare Word1: Net
Word2: reqPrint Word2: Tare
Word3: reqAccum Word3: Motion
Word4: setTare Word4: C-Zero
Word5: setCurrentUnits Word5: Actvalue
Word6: Over/Underload
WT Standard Output :
Word0: Gross
Word1: Net
Word2: Tare
Word3: Motion
Word4: C-Zero
Word5: Actvalue
Word6: Over/Underload
Note: Gross, Net and Tare will
return numeric system values.
Motion and C-zero return a true
(1) or a false (0) condition.
Actvalue returns a number 0-13.
Overload/Underload returns
0=okay, 1=under, 2=over
WT Standard Input:
Word0: reqZero
Word1: reqTare
Word2: reqPrint
Word3: reqAccum
Word4: setTare
Word5: setCurrentUnits
Note: req is motion inhibited,
set is not.
Enable software addressing to
bypass hardware switch addressing. Memory Allocation:
IP Addressing
SUBNET mask
Gateway
For information on Custom
Data Transfers, see the section
WT-BASIC Keyword MAP.
55 1310 Network Installation Manual
The Modbus/TCP Ethernet module allows for addressing via hardware or
software.
Dip-Switch S1, configures the last byte of the IP address. The IP address
will be 192.168.0.X, where X is the value of the S1.
S1-8 is the Least Significant Bit(LSB) and S1-1 is the Most Significant
Bit(MSB).
The SUBNET mask is 255.255.255.0 and the Gateway is 0.0.0.0. The
valid address range for S1 is 1-255.
If SOFTWARE ADDRESSING is to be used, ALL the switches on S1 MUST
be set to OFF. IP address, SUBNET mask, and Gateway are all config-
urable via SimPoser, when software addressing is enabled.
Configuration
Ethernet-IP Module
8. Save the 1310 configuration file and download to the indicator.
The Modbus/TCP Ethernet module has four fieldbus specific LEDs mounted
on the circuit board. The functionality of these LEDs are described below:
Indicators
1 2
4 3
LED indicators
S-1
For additional network trouble-
shooting information, see the
section 1310 Diagnostics
Menu.
56 1310 Network Installation Manual
A WinSock control allows you to connect to a remote machine and ex-
change data using the Transmission Control Protocol (TCP). Like the Timer
control, the WinSock control doesnt have a visible interface at run time.
The next few pages will outline how to create a server application that
functions as a central collection point for data from one 1310.
When creating an application that uses the TCP protocol, you must first
make your application a server. Creating a server means that your applica-
tion will listen, on a designated port. When the client(1310) makes a
connection request, the server can then accept the request and thereby
complete the connection. Once the connection is complete, the client and
server can freely communicate with each other.
The following steps create a rudimentary server:
To create a TCP server
1. Create a new Standard EXE project.
2. Change the name of the default form to frmServer.
3. Change the caption of the form to TCP Server.
4. Draw a Winsock control on the form and change its name to tcpServer.
5. Add two TextBox controls to the form. Name the first txtSendData, and
the second txtOutput.
6. Add a CommandButton, label the caption Send.
Option Explicit
global data
Dim state As Integer
Dim EOM As String
Dim Port As Long
Dim fileIO As Boolean
Dim activeFile As String
Dim fileHandle As Integer
Private Sub chkFileIO_Click()
If tcpServer.state = sckConnected Then
fileIO = chkFileIO.Value
Else
chkFileIO.Value = False
fileIO = False
End If
End Sub
key to transmit a the texted entered into the Send
text box.
Private Sub cmdSend_Click()
If tcpServer.state = sckConnected Then
txtSendData.Text = txtSendData.Text & Chr$(EOM)
tcpServer.SendData txtSendData.Text
txtSendData.Text =
End If
End Sub
Using the Winsock Control
for Visual Basic, and the
1310 Ethernet Raw
Sockets Option
TCP Connection Basics
Source code and executable
for the server are located
under the SimPoser Tools
directory.
Example Code for the
Server
This application is a DEMO and
should only be used for train-
ing. The appropriate error
handling has not been imple-
mented.
57 1310 Network Installation Manual
set all configurable parameters, close the port,
then re-open it with
the new settings
Private Sub cmdSetAll_Click()
tmrEnquire.Interval = txtTimerInterval.Text
EOM = txtTimerChar.Text
Port = txtPortNumber.Text
tcpServer.Close
tcpServer.LocalPort = Port
tcpServer.Listen
End Sub
refresh the text boxes
Private Sub cmdRefresh_Click()
txtTimerInterval.Text = tmrEnquire.Interval
txtTimerChar.Text = EOM
Port = tcpServer.LocalPort
txtPortNumber.Text = Port
End Sub
change the enquire timer interval without discon-
necting the port
Private Sub cmdSetNoDisconnect_Click()
tmrEnquire.Interval = txtTimerInterval.Text
EOM = txtTimerChar.Text
End Sub
load defaults for all information
Private Sub Form_Load()
Set the LocalPort property to an integer.
Then invoke the Listen method.
tmrEnquire.Interval = 500
EOM = 13
Port = 1001
tcpServer.LocalPort = Port
txtTimerInterval.Text = tmrEnquire.Interval
txtTimerChar.Text = EOM
txtPortNumber.Text = tcpServer.LocalPort
tcpServer.Listen
activeFile = C:\WINDOWS\DESKTOP\TEST.TXT
Dim myFile
myFile = Dir(c:\windows\desktop\test.txt)
If (myFile <> ) Then
Kill (c:\windows\desktop\test.txt)
End If
End Sub
Private Sub tcpServer_ConnectionRequest _
(ByVal requestID As Long)
If tcpServer.state <> sckClosed Then
tcpServer.Close
End If
tcpServer.Accept requestID
End Sub
if the port is open, but the connection was lost,
close the port
and re-open it, so we dont have to wait for that
port & socket to
free up again.
58 1310 Network Installation Manual
Private Sub tmrConnect_Timer()
If tcpServer.state <> sckConnected Then
tcpServer.Close
tcpServer.LocalPort = Port
tcpServer.Listen
End If
End Sub
timer to request data from a client
Private Sub tmrEnquire_Timer()
If tcpServer.state = sckConnected Then
tcpServer.SendData Chr$(EOM)
End If
End Sub
get the incoming character(s) and append them until the
EOM character has been
received.
Private Sub tcpServer_DataArrival _
(ByVal bytesTotal As Long)
Dim strData As String
tcpServer.GetData strData
If (state = 1) Then
txtOutput.Text =
state = 0 allow append
if the file is not open then open it.
If (fileIO) Then
fileHandle = FreeFile
If (fileHandle <> 0) Then
Open activeFile For Append As fileHandle
Else
chkFileIO.Value = False
fileIO = False
End If
End If
End If
If (Asc(strData) >= 32) Then
txtOutput.Text = txtOutput.Text + strData
End If
If (InStr(strData, Chr$(EOM))) Or (InStr(strData,
Chr$(13))) Then
If (fileIO And fileHandle <> 0) Then
Write #fileHandle, txtOutput.Text; Chr$(10);
Chr$(13); send <LF><CR> for new line
End If
state = 1 next packet clears text box
Close close all open file handles
End If
End Sub
59 1310 Network Installation Manual
Received
Data from
the 1310.
Timer interval setting
in milliseconds.
End of Message Character
text box. All messages
transmitted and received are
based off this character.
Allows you to
change the Timer
interval or EOM
Character without
disconnecting the
socket or port.
Disconnects the
socket and port,
changes the settings,
and re-connects
based on the values
in the text boxes.
Click this check box to create
C:\windows\desktop\test.txt.
This file will contain ALL
characters transmitted to the
PC, via the 1310. The text is
only written to the file when
the EOM character is re-
ceived.
Refreshes the values
in the text boxes.
Click to send the message from
the Send text box. The EOM
character will be appened to the
text that is entered.
Enter data to be
transmitted to the
1310.
Download winsock.310, which is located in the SimPoser dat directory.
The indicator will transmit the word Hello with a counter. You can also
transmit data to the indicator. Type the message you wish to transmit in the
Send text box. Click the Send button when you are ready to transfer the
data to the indicator.
An example of integrating this server into an Excel spreadsheet is also
included in the SimPoser tools directory. The same winsock.310 applica-
tion will transmit the word Hello and a counter to cell A1 on the spread
sheet. Simply download the application to the 1310 and click the Start
Server button on the spread sheet. When you are finished, click on the
Stop Server button.
Below is a screen capture of the example TCP Server application. It is
created by using the source code shown on the previous pages. The TCP
Server application is an example of an ethernet terminal. This allows you to
communicate directly with the 1310 via ethernet.
60 1310 Network Installation Manual
61 1310 Network Installation Manual
Weigh Bar

is a registered trademark of Weigh-Tronix Inc.


01/27/03 1310NETWORK_i.P65 PN 29806-0013A e2 Printed in USA
Avery Weigh-Tronix Canada, ULC
217 Brunswick Boulevard
Pointe Claire, QC H9R 4R7 Canada
Telephone: 514-695-0380
Toll free: 800-561-9461
Facsimile: 514-695-6820
www.weigh-tronix.ca
Avery Weigh-Tronix
1000 Armstrong Dr.
Fairmont, MN 56031 USA
Telephone: 507-238-4461
Facsimile: 507-238-4195
e-mail: industrial@weigh-tronix.com
www.wtxweb.com