AppNote Connecting a barcode scanner to a STEPPII or an

AppNote Connecting a barcode scanner to a STEPPII or an
This document is available at http://www.falcom.de/.
Connecting a bar code
scanner to a STEPPII,
STEPPIII, BOLERO-LT
or FOX device
Application Notes
Version: 1.0.1; Last modified: Wednesday 29 October 2014
CONNECTING
A BAR CODE SCANNER TO A
STEPPII
OR AN
AVL DEVICE -
VERSION 1.0.1
Version history:
This table provides a summary of the document revisions.
Version
Author
1.0.1
1.0.0
F. Beqiri
F. Beqiri
Changes
Added configuration commands for the STEPPIII, BOLERO-LT and FOX.
Initial version
Last modified
29/10/2014
04/09/2008
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 2 of 7
CONNECTING
A BAR CODE SCANNER TO A
STEPPII
OR AN
AVL DEVICE -
VERSION 1.0.1
Table of contents
1 INTRODUCTION
5
1.1 FIRMWARE CONFIGURATION
1.2 BAR CODE SCANNER SETTINGS
1.3 CONFIGURING A STEPPII DEVICE FOR DATA MODE
1.4 CONFIGURING A STEPPIII, BOLERO-LT, FOX DEVICE
1.5 SENDING RECEIVED SERIAL DATA TO A SERVER
1.6 WRITING SERIAL DATA TO HISTORY
5
5
5
6
6
7
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 3 of 7
CONNECTING
A BAR CODE SCANNER TO A
STEPPII
OR AN
AVL DEVICE -
VERSION 1.0.1
Cautions
Information furnished herein by FALCOM is believed to be accurate and reliable.
However, no responsibility is assumed for its use. Please, read carefully the safety
precautions.
If you have any technical questions regarding this document or the product described
in it, please contact your vendor.
General information about FALCOM and its range of products are available at the
following Internet address: http://www.falcom.de/
Trademarks
Some mentioned products are registered trademarks of their respective companies.
Copyright
This document is copyrighted by FALCOM GmbH with all rights reserved. No part of this
documentation may be produced in any form without the prior written permission of
FALCOM GmbH.
FALCOM GmbH.
The manufacture assumes no liability for any errors or discrepancies that may have
occurred in preparation of this document.
Note
Specifications and information given in this document are subject to change by
FALCOM without notice.
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 4 of 7
CONNECTING
A BAR CODE SCANNER TO A
STEPPII
OR AN
AVL DEVICE -
VERSION 1.0.1
1 INTRODUCTION
This document describes how to connect a bar code scanner to a STEPPII, STEPPIII,
BOLERO-LT and FOX device and how to store or transmit the scanned data. This
example should give an idea on how to connect serial devices on a STEPPII, STEPPIII,
BOLERO-LT and FOX and process the incoming data in general.
1.1 Firmware configuration
Default operation of the RS232 port on the STEPPII AMP connector is the command
mode. In this mode the protocols and debug information are send to the serial port and
it listens for commands which the user can send to the device.
In order to get data from a bar code scanner via the RS232 port of the STEPPII, it has to
be set into data mode. In data mode the STEPPII can not receive PFAL commands
anymore.
In this example one input will be programmed to be able to switch between command
and data mode.
1.2 Bar code scanner settings
The bar code scanner used for this application note is a Firescan D131. It uses a 38400
baud RS232 connection and sends a carriage return/line feed after sending its scanned
data.
By default, the serial port of the STEPPII, STEPPII, BOLERO-LT and FOX runs at 57600 baud.
In order to make both devices talk to each other you will need to change the baud
rate for the used serial port to 34800 baud using the following command:
For STEPPII
$PFAL,CNF.Set,DEVICE.SERIAL.BAUDRATE=38400
For STEPPIII, BOLERO-LT, FOX
$PFAL,CNF.Set,DEVICE.SERIAL0.BAUDRATE=38400
1.3 Configuring a STEPPII device for data mode
As mentioned above, one of the inputs of the STEPPII will be used to switch between
Command and Data mode:
 When, for example, the input 1 is switched on, the STEPPII is set into the Data mode:
$PFAL,CNF.Set,AL5=IO.IN.e0=redge:CNF.Set,DEVICE.COMM.SERIAL=data=0,1,F
Parameters for data= 0, 1, F
0:
1:
F:
Received data is not transferred immediately but can be used to
execute alarms.
Enables events when the system detects a carriage
return/linefeed.
All system status have to be transmitted.
 When input 1 is switched off, the STEPPII is reset into the Command mode:
$PFAL,CNF.Set,AL6=IO.IN.e0=fedge:CNF.Set,DEVICE.COMM.SERIAL=cmd,F
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 5 of 7
CONNECTING
A BAR CODE SCANNER TO A
STEPPII
OR AN
AVL DEVICE -
VERSION 1.0.1
1.4 Configuring a STEPPIII, BOLERO-LT, FOX device
The STEPPIII, BOLERO-LT and FOX do not need to be set into the Data mode, because
the command mode allows also event generation for incoming text messages
terminated by the line feed <LF> character that do not start with PFAL. It is assumed
that, the text sent from the scanner is terminated by the line feed <LF> character,
otherwise no event would be occurred.
To use one of the above-mentioned device for scanner application, make sure that
Serial0 is in the Command mode. To change the Serial0 into the Command mode
execute the followin command:
$PFAL,MSG.Mode.SERIAL0=7F,C
Parameters for command mode=7F, C
7F:
All system status and protocols have to be transmitted.
C:
Sets the Serial0 into the command mode.
D00218C767CB560D
1.5 Sending received serial data to a server
The STEPPII, STEPPIII, BOLERO-LT or FOX device gets configured to send the received
serial data together with the actual date, time and position to an internet server:
For STEPPII
$PFAL,CNF.Set,AL7=Sys.eSerialData:TCP.Client.Send,8,"TrackingNumber: &(SerialData)"
For STEPPIII, BOLERO-LT, FOX
$PFAL,CNF.Set,AL1=SYS.Device.eStart:MSG.Send.RawSerial0,0,"start"
$PFAL,CNF.Set,AL7=Sys.eSerialData0:TCP.Client.Send,8,"TrackingNumber: &(SerialData0)"
To send the received Serial0 data to the Trace4You - server use the following alarm with
the event <sfal.event.text='&(SerialData0)'> in the user text.
$PFAL,CNF.Set,AL7=Sys.eSerialData0:TCP.Client.Send,8,"<sfal.event.text='&(SerialData0)'>"
➢
The event Sys.eSerialData for STEPPII or Sys.eSerialData0 for STEPPIII, BOLEROLT or FOX device occurs every time when the STEPPII detects a carriage
return/line feed for STEPPII or the STEPPIII, BOLERO-LT, FOX detects a line feed
on the serial port (as configured before).
➢
TCP.Client.Send,8,"TrackingNumber: &(SerialData0)" command sends the GPRMC
protocol and the user defined text to a remote server.
➢
The dynamic entry &(SerialData) for STEPPII and &(SerialData0) for STEPPIII,
BOLERO-LT and FOX device contain the received serial data from the RS232
port.
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 6 of 7
CONNECTING
A BAR CODE SCANNER TO A
Figure 1:
STEPPII
OR AN
AVL DEVICE -
VERSION 1.0.1
Screenshot from the FALCOM Online Tracking Solution including a STEPPII history with
scanned barcode data.
1.6 Writing serial data to history
Besides sending the received serial data to a server, it is also possible to store the data
in the device history and read it out later.
If the data should only be stored in history change, the alarm can be defined as follow:
For STEPPII
$PFAL,CNF.Set,AL7=Sys.eSerialData:GPS.History.Write,8,"Tracking Number: &(SerialData)"
For STEPPIII, BOLERO-LT, FOX
$PFAL,CNF.Set,AL7=Sys.eSerialData0:GPS.History.Write,8,"Tracking Number: &(SerialData0)"
This confidential document is a property of FALCOM and may not be copied or circulated without previous permission.
Page 7 of 7
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement