Difference between revisions of "Scale Communication"

From HiveTool
Jump to: navigation, search
(Configuration)
Line 1: Line 1:
= Cable =
+
== Cable ==
 
RS-232 Serial Communication Ports
 
RS-232 Serial Communication Ports
  
Line 11: Line 11:
 
{{:Adam Equipment CPWplus200 Configuration}}
 
{{:Adam Equipment CPWplus200 Configuration}}
  
= Testing communication =
+
== Testing communication ==
  
 
Terminal Emulation program like Minicom
 
Terminal Emulation program like Minicom
Line 17: Line 17:
 
During initial testing, if trouble is encountered communicating with the scale, it may be useful to set the scale in trn 2 mode so that it continuously transmits data.
 
During initial testing, if trouble is encountered communicating with the scale, it may be useful to set the scale in trn 2 mode so that it continuously transmits data.
  
= Configuring the computer's serial port =
+
== Configuring the computer's serial port ==
  
 
To list the line parameters for ttyS0:
 
To list the line parameters for ttyS0:

Revision as of 03:33, 14 January 2014

Cable

RS-232 Serial Communication Ports

Depending on whether the scale is wired for DTE or DCE, it may require a null modem cable or replacing and rewiring the serial connector.

Configuration

Set up the scale. 9600 baud, 8 bit, no parity

Adam Equipment CPWplus200

See Section Section 13 of the CPW200plus User Manual for detailed instructions.

With the scale off, hold the Tare/Zero button and press the On/Off button.

Parameter Setting Rational
Auto Power Off Pr oFF Don't want the scale to turn off after a period of inactivity.
Backlight always off bL 1 Increases battery life when AC power fails.
Baudrate 9600 Default
8 Bit no parity PAr 1 Default
Transmission Mode trn 1 Default. Can set to trn 2 during trouble shooting.

Testing communication

Terminal Emulation program like Minicom

During initial testing, if trouble is encountered communicating with the scale, it may be useful to set the scale in trn 2 mode so that it continuously transmits data.

Configuring the computer's serial port

To list the line parameters for ttyS0: stty -F /dev/ttyS0 -a

Example:

# stty -F /dev/ttyS0 -a    
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke


stty can also be used to set the serial port parameters:

stty -F/dev/ttyS0  -hupcl ignbrk  -icrnl -ixon -opost  -onlcr -isig -icanon -
iexten -echo -echoe -echok  -echoctl -echoke igncr