Home
DataPaq™ 2.40 Remote Control User Manual
Contents
1. Page 22 0f34 DataPaq Remote Control User Manual E iel O Freire i PRACTICAL INNOVATION Response OK r n Upon receiving this command DataPaq will turn on the activator and if a plate is placed on the scanner then the rack will be scanned using the uid passed in by SET_ACTIVATOR_UID and the results returned the notificiation port according to the format set by SET_ACTIVATOR_RESULT_FORMAT If there is no Ziath Linear Reader enabled then ERR32 will be thrown Example Received by Server ACTIVATE_PLATE_REMOTE r n Response from Server ZIA6986765 r nOK r n e Deactivate Scan Remote Command DECTIVATE SCAN REMOTE r n Response OK r n Upon receiving this command DataPag will turn off the activator and if a plate is placed on the scanner then the rack will not be scanned Example Received by Server DEACTIVATE_PLATE_REMOTEN r n Response from Server OK r n e Is Activator Scan Remote Command IS_ ACTIVATOR_SCAN_REMOTE r n Response lt TRUE FALSE gt r nOK r n Upon receiving this command DataPaq return true if the activator is set to scan when a new plate is detected by the linear scanner false if not Example Received by Server IS_ACTIVATOR_PLATE_REMOTE r n Response from Server TRUE r nOK r n DataPaq Remote Control User Manual Page 23 of 24 m O Freire i PRACTICAL INNOVATION a Set Activator Duplicate Wait Command SET ACTIVATO
2. Command DECODE IMAGE lt UID gt lt FORMAT gt lt MIME ENCODED RAW IMAGE gt lt RACK BARCODE S gt r n Response OK r n IMAGE IS DECODED lt SCAN RESULTS gt OK r n Upon receiving this command DataPag will load the image from the MIME string and attempt to decode it with the specified UID Note that both the DataPag install that made the image and the server that is decoding the image need to be licenced Example Received by Server DECODE IMAGE 1234 XML MIME STRING BAR1 r n Response from Server OK r n WAIT SCAN RESULTS r n Enable Decode Updates Command ENABLE DECODE UPDATES r n Response OK r n Upon receiving this command the next time DataPag decodes a rack a notification of each well decoded will be sent along with the number of wells to decode note that also ticks up empty decoded wells Note that the decoding is typically so guick that this will slow down decoding of the rack These notifications appear between the OK received by a decode reguest and the scan results the notifications are in the format of 1 OF 96 r n 2 OF 96 r n and so on Example Received by Server ENABLE DECODE UPDATES r n Response from Server OK r n Disable Decode Updates Command DISABLE DECODE UPDATES r n Response OK r n Upon receiving this command the next time DataPaq decodes a rac
3. Page 100f34 DataPaq Remote Control User Manual E iel Peter i PRACTICAL INNOVATION o export format this is the return format for the read it can be excel xml json or text o barcodes this is a comma separated list of rack barcodes for example CODE1 CODE2 CODE3 Note that should the rack 1D barcode scanner option be installed then this option will be ignored and the results of the barcode scanner will be used instead Response OK r n the scanner scans andthen lt result of scan gt r nOK r n When the server receives this command it scans the deck and returns the results to the caller via the connected socket The scanner will either return a string if text as the export format is supplied or it will return a stream of bytes which represent a binary excel file Should the scan fail the system will return ERR r n with a description of the error Note that the format of the text returned can be changed upon request should you require this to be done then please contact Ziath at queries ziath com Example Received by Server SCAN 1234 text 1 2 3 r n Response from Server OK r n The scanner does its scan ScanID Date RackBarcode Row Col tubeBarcode 1 13 Nov 2008 22 06 18 CODE1 A 1 1013587786 1 13 Nov 2008 22 06 18 CODE1 A 2 1013586701 Ei 1 13 Nov 2008 22 06 18 CODE1 A 3 1013587788 1 13 Nov 2008 22 06 18 CODE3 H 10 101358
4. we have the image we now need to convert the encoded string to bytes and then write the image to a file byte decoded new BASE64Decoder decodeBuffer buffer toString BufferedImage bi ImageIO read new ByteArrayInputStream decoded return bi J x Disconnected this client from the DataPag server The server remains Page 320f34 DataPaq Remote Control User Manual Peter i PRACTICAL INNOVATION operational after this call throws IOException if there is a problem writing to the socket out or reading from socket in public void close throws IOException out write CLOSE r n getBytes out flush System out println in readLine J x Shuts down the DataPag server if it is not busy Note that this will disconnect all other connected clients throws IOException if there is a problem writing to the socket out or reading from socket in wi public void shutdown throws IOException out write SHUTDOWN r n getBytes out flush System out println in readLine Tests execution of the DataPag server via a socket Before executing this ensure that the DataPag server is running the port of 8888 is the default port which will be used this is assumes that the test is running on the same machine as the DataPag server It also assumes the server is already running throws UnknownHostException throws IOException throws Int
5. COM PORT lt The com port to connect to gt r n Response OK r n When receiving this command DataPaq disconnects the current 1D barcode scanner com port if it is connected DataPaq then attempts to connect to the specified com port If the specified com port cannot be found by DataPaq ERR18 is returned If for some reason DataPaq cannot connect to the com port then ERR19 is returned Note that this only works for the hardware external linear scanner which has been discontinued by Ziath Example Received by Server SET BARCODE SCANNER COM PORT COM1 r n Response from Server DataPaq disconnects from the current com port and reconnects to the specified com port JOK r n e Enable Barcode Scanner Command ENABLE BARCODE SCANNER r n Response OK r n When receiving this command DataPaq enables the 1D rack barcode scanner Example Received by Server ENABLE BARCODE SCANNER r n Response from Server OK r n e Disable Barcode Scanner Command DISABLE BARCODE SCANNER r n Response OK r n When receiving this command DataPaq disables the 1D rack barcode scanner Example Received by Server DISABLE BARCODE SCANNER r n DataPaq Remote Control User Manual Page 17 of 24 E mz PRACTICAL INNOVATION iel Response from Server OK r n e Get Barcode Scanner Enabled Command GET BARCODE SCANNER_ENABLED r n Resp
6. Listener class java lang Thread Thread Java2D Disposer class java lang Thread Thread Swing Shell class java lang Thread Group main class java lang ThreadGroup Thread main class java lang Thread Page 8 of 34 DataPaq Remote Control User Manual E mz PRACTICAL INNOVATION iel Thread AWT Windows class java lang Thread Thread Thread 2 class com ziath datapag scannerconnection ScanThreadImpl Thread Thread 3 class org apache log4j xml XMLWatchdog Thread Emergency shutdown socket server class java lang Thread Thread Server 0 0 0 0 0 0 0 1 58576 58576 class java lang Thread Thread Emergency shutdown socket server class java lang Thread r nOK r n e Get Memory Usage Command GET MEMORY USAGE r n When the server receives the command it returns the current memory usage split into Allocated Free Max and Total Free Response lt memory usage report gt r nOK r n Example Received by Server GET MEMORY USAGE r n Response from Server FREE MEMORY 12111 ALLOCATED MEMORY 15872 MAX MEMORY 253440 TOT AL FREE MEMORY 249679 r nOK r n e Get UIDS Command GET UIDS r n Response 2 Standard Single Plate 96 Well Plate r n 1 Standard Single Plate 48 Well Plate r n lt uid gt lt Scanner Name gt lt Group Name gt r n OK r n When the ser
7. Manual E iel O Freir i PRACTICAL INNOVATION e Restart DataPaq and read this plate group it should show Loading Demo Image and then decode the image This plate group will now execute with no scanner attached This will operate in normal mode or in headless mode NET Library Ziath provides a NET library for integration use contact support ziath com for a reference Java amp Python Sample Code Ziath provide sample code in Java and Python the Java code is at the end of the manual and contact Ziath for the Python code Command Line Mode Command line mode allows the user to simply execute a command line at the command prompt the software will start up execute the scanner and return the results formatted according to the supplied commands in the command line To start the server in command line mode you simply need to specify the following options Short Form Long Form Params Default Description c Calibrate None None Instructs the scanner to calibrate the specified plate group The plate group id must be supplied for this command Note that if this is not specified the scanner will run a scan operation e Exportformat excel text xml Text Sets the format of the export set to either xml json excel or text f Exportfile filename Stdout Specifies the file to write to If this is not specified the results will be written to the standard out of the process typically to the console
8. 8736 1 13 Nov 2008 22 06 18 CODE3 H 11 1013588735 1 13 Nov 2008 22 06 18 CODE3 H 12 1013588208 OK r n e Calibrate Command CALIBRATE lt plate group id to calibrate gt DataPaq Remote Control User Manual Page 11 of 24 E mz PRACTICAL INNOVATION iel Params o uid the plate group to calibrate Response OK r n the scanner calibrates and then OK r n Upon receiving this command the scanner will calibrate the specified plate group with the racks on the deck of the scanner It will initially return OK perform the scan and then return OK when the scan is finished Should the calibration fail the scan will return ERR r n with a description of the error message Example Received by Server CALIBRATE 1234 r n Response from Server OK r n The scanner does its calibration OK r n e Last Image Command LAST IMAGE lt The Scanned Position starting at 0 gt lt the scale factor optional gt lt format optional gt r n Response lt the image as a multi line base 64 encoded string gt lt A blank line gt OK r n Upon receiving this command the server will retrieve the last image scanned for the current position annotate the image encode the image as the requested format further encode the image into a base64 string and send it to the client if the scale factor is supplied the image w
9. LTS_FORMAT command Error Codes Should the server encounter an error it will return the error plus a description in the following format lt ERROR CODE gt r n lt ERROR DESCRIPTION gt lt ERROR_MESSAGE gt r n In some cases there will not be a specific error message but the description will always be present and two lines will always be returned An example of an error return is below ERR1 r n The unique ID and the export method must be supplied on a scan r n In the case of an error with a description an example is below ERR8 r n Failed to scan Cannot communicate to scanner r n Error Code Error Description ERR1 The unigue ID and the export method must be supplied on a scan ERR2 The export methods can only be xml text json or excel ERR3 The unigue ID must be supplied on a calibrate ERR4 Failed to cleanly shut down ERR5 Failed to calibrate ERR6 Unknown Command ERR7 Server busy ERR8 Failed to scan ERR9 Please provide image number to return ERR10 Image number is not numerical ERR11 Error writing image to client ERR12 No image available to return ERR13 Linear barcode not read DataPaq Remote Control User Manual Page 27 of 24 a 12 Fa O Freir i PRACTICAL INNOVATION ERR14 Cannot communicate to linear barcode scanner ERR15 Lin
10. R DUPLICATE WAIT lt the time to wait between reading the same barcode in seconds gt r n Response OK r n Upon receiving this command DataPaq will record a value in seconds to repeatedly read a barcode on a rack the scanner when it is placed on the scanner every x seconds If no positive integer is passed then ERR29 will be thrown Example Received by Server SET_ACTIVATOR_DUPLICATE_WAIT 1 r n Response from Server OK r n Get Activator Duplicate Wait Command GET ACTIVATOR DUPLICATE WAIT r n Response 1 r nOK r n Upon receiving this command DataPaq will return the value used to repeatedly read a barcode on a rack the scanner when it is placed on the scanner every x seconds Example Received by Server GET_ACTIVATOR_DUPLICATE_WAIT r n Response from Server 1 r nOK r n Set Activator Read Duplicate Command SET ACTIVATOR READ DUPLICATE r n Response OK r n Upon receiving this command DataPaq will repeatedly read a barcode on a rack when it is placed on the scanner every x seconds the x seconds is set by SET_ACTIVATOR_READ_DUPLICATE_WAIT Example Received by Server SET_ACTIVATOR_READ_DUPLICATE r n Response from Server OK r n Page 240f34 DataPaq Remote Control User Manual E Peter i PRACTICAL INNOVATION a Set Activator No Read Duplicate Command SET ACTIVATOR NO READ DUPLICATE r n Response OK r n Upon receiving this command DataPag will no longer repe
11. R RESULT FORMAT lt the result format to export when activated gt r n Response OK r n This will set the result format to use when the activator triggers a plate read The format must be xml text excel or json If one of these is not provided ERR2 will be thrown If this is not set then the format will default to xml Example Received by Server SET_ACTIVATOR_RESULT_FORMAT xml r n Response from Server OK r n Get Activator Result Format Command GET ACTIVATOR RESULT Format r n Response json r nOK r n This will return the result format exported to scan when the activator triggers a plate read The value is either text xml json or excel if no value has previously been set this will default to xml Example Received by Server GET_ACTIVATOR_RESULT_FORMAT r n Response from Server json r nOK r n Notification If the activator is present and turned on to scan or plate presence notify the following commands may be received on the notification port Page 26 of 34 DataPaq Remote Control User Manual E iel Peter i PRACTICAL INNOVATION PLATE_PRESENT lt Rack Barcode gt r nOK r n this will be triggered when a plate is detected on the scanner e SCAN_STARTED lt uid gt lt Rack Barcode gt r nOK r n this will be triggered when a scan is triggered and about to start e lt SCAN RESULTS gt r nOK rin this will be the results of the scan the format of which determined by the SET_ACTVATOR_RESU
12. RuntimeException Scanner reported error line in readLine scanFirstLine false if line equals OK break scanBuffer append line append r n return scanBuffer toString J x Returns the last scanned image from the DataPag server param scanPos the position on the scanner to retrieve starts counting at zero DataPaq Remote Control User Manual Page 31 of 24 Petes i PRACTICAL INNOVATION return a buffered image representing the scanned image throws IOException K if there is a problem writing to the socket out or reading from socket in y public BufferedImage getLastScanImage Integer scanPos throws IOException get the image of the last scan System out println Getting last scanned image out write LAST IMAGE 0 r n getBytes out flush System out println reading image in reading image in StringBuffer buffer new StringBuffer Boolean imageFirstLine true while true String line in readLine buffer append line append r n the first line may be an error so we check for that and then set first lien to false as the rest of the lines will not be in error if imageFirstLine imageFirstLine false if line startsWith ERR System out println Error line throw new RuntimeException failed to read image line in readLine else if line length 0 break
13. Settings Add scanners for development purposes A6 scanner AV6 scanner Express scanner Multi rack scanner Cancel all changes and close window Add in a demo scanner for this example we will use the AV6 scanner Setup a 96 well portrait plate don t forget the unique ID Close DataPaq An image of the plate is required If there is a rack available then place a plate onto the scanner and take a greyscale image using the windows document and scanner wizard or other software such as IrfanView http www irfanview com of the entire available space on the scanner not just the rack save this image in a format which is lossless such as png or bmp Copy this image to a defined location If no rack or scanner is available then please contact support at support ziath com with the information of the make and model you wish to scan Open the configuration file at C PROGRAMDATA Ziath DataPaq settings xml note that this is the ProgamData folder and not the Program Files folder and you will need to activate the Show Hidden Files and Folders option in File Explorer If on windows XP this folder will be different and depend upon the language setting of your computer At the top of the file is the plate group you have just configured with an empty attribute called demo add into this the full filename and path of the image file you just copied into the DataPag install directory Page 4o0f34 DataPaq Remote Control User
14. TR a Ofa z PRACTICAL INNOVATION DataPaq Remote Control User Guide DataPaq Version 2 40 Manual Version rev 1 E Peter PRACTICAL INNOVATION DataPaq Remote Control User Guide All Rights Reserved Ziath and DataPaq are registered trademarks of Ziath Ltd No part of this publication in either its printed or electronic format may be copied reproduced or transmitted in any form or by any means electronic or mechanical for any purpose involving resale for profit or gain through any form of paid membership or subscription service without the express permission of Ziath Ltd DataPaq User Guide Copyright 2008 2009 2010 2011 2012 2013 2014 Ziath Ltd Revised 15 08 2014 Page 20f34 DataPaq Remote Control User Manual a 12 Fa Peter i PRACTICAL INNOVATION DataPaq Remote Control Introduction The headless enhancement to DataPag allows for the interaction of a separate computer program to control the scanner and retrieve the results This is enabled by a separate program entitled Server exe which is provided This will interact with DataPaq and control the scanner without a Graphical User Interface showing on the screen There are two modes in which the server can be started up i command line mode and ii server mode Activating Demonstration Mode DataPag can operate in a demonstration mode in this mode it will load a prescanned image to decode This has the
15. advantage that an integrator does not need a DataPag scanner attached to their computer when performing integration work To activate this mode take the following steps e Install DataPag start the application not in headless mode and select Trial mode when prompted You may enter a license key but the license key will be locked to your development machine should you reguire a developer s license please contact support at support ziath com e Open the options window and expand the width to the right to reveal the Dev Settings option HT MN w ors Other Settings File Details Excel File format Text File format File Name Default File Pattern Example file name Default export directory C Users neil Desktop File Details Append file data to existing file Does not apply to XML exports Automatic Export Export On Read Do not automatically export a file Automatically Export File if no read errors occur Automatically Export File even if read errors occur Export Type Excel Select this to export a single file for each scanned rack Open results file on save Apply all changes and close window Cancel all changes and close window DataPaq Remote Control User Manual Page 3of 24 E mz PRACTICAL INNOVATION iel A WE A 2 O L ae ort Barcode Scanner Database Export Time out settings Scan Time Questions Activators Other Settings Dev
16. arameter if reguired Commands e Version Command VERSION r n Response lt version code gt r nOK r n When the server receives the command it returns the version number of DataPaq that it is connected to Example DataPaq Remote Control User Manual Page 7 of 24 E mz PRACTICAL INNOVATION iel Received by Server VERSION r n Response from Server 1 1 r nOK r n e Get Max Connections Command GET MAX CONNECTIONS r n When the server receives the command it returns the maximum number of simultaneous client connections allowed Response lt number of maximum allowed connections gt r nOK r n Example Received by Server GET MAX CONNECTIONS r n Response from Server 20 r nOK r n e Get Thread Report Command GET THREAD REPORT r n When called this returns details on the threads on the server note that client threads are labelled Server with the IP address of the client and the local port number the server is listening on Response lt the thread report gt r nOK r n Example Received by Server GET THREAD REPORT r n Response from Server Group system class java lang ThreadGroup Thread Referenc Handler class java lang ref Reference ReferenceHandler Thread Finalizer class java lang ref FinalizerSFinalizerThread Thread Signal Dispatcher class java lang Thread Thread Attach
17. atedly read a barcode on a rack when it is placed on the scanner Example Received by Server SET_ACTIVATOR_NO_READ_DUPLICATEN r n Response from Server OK r n Get Activator Read Duplicate Command GE T ACTIVATOR READ DUPLICATE r n Response lt TRUE FALSE gt r nOK r n Upon receiving this command DataPag will return back if it is set to repeatedly read a barcode on a rack the scanner when it is placed on the scanner every x seconds the x seconds is set by SET_ACTIVATOR_READ_DUPLICATE_WAIT Example Received by Server GET_ACTIVATOR_READ_DUPLICATE r n Response from Server TRUE r nOK r n Set Activator Uid Command SET ACTIVATOR UID lt the uid to read when activated gt r n Response OK r n This will set the uid to scan when the activator triggers a plate read The uid must be present and known if it is not then ERR26 will be thrown Example Received by Server SET_ACTIVATOR_UID 96deep r n Response from Server OK r n Get Activator Uid Command GET ACTIVATOR_UID r n DataPaq Remote Control User Manual Page 25 of 24 E O Freire i PRACTICAL INNOVATION a Response 96deep r nOK r n This will return the uid to scan when the activator triggers a plate read If no activator uid has been set then ERR34 will be returned Example Received by Server GET_ACTIVATOR_UID r n Response from Server 96deep r nOK r n Set Activator Result Format Command SET ACTIVATO
18. b Rackbarcodes comma separated Unknown A comma separated list of the rack string barcodes note should the rack barcode scanner be installed this option will be ignored g Scannergroup group uid None The id of the scanner group to scan or calibrate V Verbose None None If specified DataPaq will post comments on progress to the screen j Saveimage filename None If specified along with a scan this will save the raw image in png format to the specified filename k Scanimage filename None This will scan and save a raw image to DataPaq Remote Control User Manual Page 5of 24 E iel Petes i PRACTICAL INNOVATION the entered filename It will not attempt to decode the image it will just save it Linear None none This will scan the linear barcode on the rack and return The scan result will be returned on stdout For all filename you can use the following placeholders e date inserts the date in iso format e time inserts the time in iso format e barcode inserts the rack barcode in iso format e uid inserts the unique id e plategroup inserts the name of the group represented by the uid Therefore due to the defaults the simplest command line operation of DataPag is as follows Server g 1234 This will run the scanner to scan in command line mode returning the results in text format to the command line A more sophi
19. e VERSION r n getBytes out tilush String version in readLine System out println VERSION version System out println VERSION ACKNOWLEDGEMENT in readLine return version Returns the status of the scanner return the scanner status throws IOException if the scanner cannot be communicated with public String getStatus throws IOException out write STATUS r n getBytes out flush String status in readLine System out println STATUS status System out println STATUS ACKNOWLEDGEMENT in readLine return status Page 300f34 DataPaq Remote Control User Manual Peter i PRACTICAL INNOVATION J x Runs a scan in text mode and returns the results of the scan in a string param uid the unique id of the plate to scan as configured in the DataPaq application return a string representing the scan result throws IOException if there is a problem writing to the socket out or reading from socket in public String runScan String uid throws IOException perform a scan out write SCAN uid TEXT r n getBytes eut flush 3 System out println SCAN RECEIVED in readLine read in all the results appending to the StringBuffer StringBuffer scanBuffer new StringBuffer Boolean scanFirstLine true while true String line in readLine if scanFirstLine if line startsWith ERR throw new
20. e has been saved DataPaq will then send OK r n IF no scale factor is entered then the image will not be scaled and if no format is requested the image will be a png file Available formats are png jpeg and bmp Errors ERR10 Image number cannot be parsed typically because it is not an integer ERR12 No image available because no scan was run after DataPaq started up ERR17 Image cannot be saved unusually due to either a bad file name or permission problems with the file location ERR22 Scale factor cannot be parsed typically because it is not an Integer or a double ERR25 Image format was not one of png jpeg or bmp Example Received by Server SAVE _ LAST IMAGE 0 c Users benn datapag image jpg 0 2 jpeg r n Response from Server OK r n DataPaq Remote Control User Manual Page 13 of 24 m Petes i PRACTICAL INNOVATION a Last Raw Image Command LAST RAW IMAGE lt The Scanned Position starting at 0 gt r n Response lt the image as a multi line base 64 encoded string gt lt A blank line gt OK r n Upon receiving this command the server will retrieve the last image scanned for the current position encode the image as a png further encode the image into a base64 string and send it to the client Note that this image is the raw image from the imaging device and is therefore quite large Once the entire image has been sent DataPag will t
21. ear barcode scanner not enabled ERR16 To save an image provide the scan position and save location ERR17 Save image failed ERR18 Com port does not exist ERR19 Cannot set com port ERR20 Cannot get port ids ERR21 Barcode scanner com port not set ERR22 Please provide an integer as a scale factor ERR23 Too many connections ERR24 Cannot set hardware port while hardware linear scanner not used ERR25 Acceptable image formats are png jpeg or bmp ERR26 Uid not known ERR27 Uid must be provided ERR28 Uid must be provided on scan image ERR29 Duplicate wait value must be a positive number ERR30 Activator Uid not set ERR31 Cannot activate while processing command ERR32 Ziath linear scanner must be enabled to use the activator ERR33 Failed to get connected scanners ERR34 Activator uid not set Page 280f34 DataPaq Remote Control User Manual Peter i PRACTICAL INNOVATION Appendix A The following is some example code written in Java that illustrates how to connect to and use the headless DataPaq server import java awt Image import java awt Toolkit import java awt image BufferedImage import java io BufferedReader import java io ByteArrayInputStream import java io IOException import java io InputStreamReader import java io OutputStream import java net Socket import java net UnknownHostException import javax imageio ImageIO import javax swing ImageIcon import javax swing JFrame import javax sw
22. erruptedException public static void main String args throws UnknownHostException IOException DataPagRemote dpr null try System out printin Connecting dpr new DataPaqRemote DataPaqRemote DATAPAQ SERVER_HOST DataPaqRemote DATAPAQ SERVER_PORT System out println dpr getVersion System out println dpr getStatus DataPaq Remote Control User Manual Page 33 of 24 Peter i PRACTICAL INNOVATION System out println dpr runScan 1 Image i dpr getLastScanImage 0 i i getScaledInstance i getWidth null 5 i getHeight null 5 Image SCALE SMOOTH showImageInFrame i System out println success finally System out println closing if dpr null dpr close Shows the image specified in the parameter in a frame param bi the image to show private static void showImageInFrame Image bi JFrame frame new JFrame Scanned Image frame setDefaultCloseOperation JFrame EXIT ON CLOSE JLabel 1 new JLabel l setIcon new ImageIcon bi frame getContentPane add l frame pack frame setResizable false frame setLocation int Toolkit getDefaultToolkit getScreenSize getWidth frame getWidth 2 int Toolkit getDefaultToolkit getScreenSize getHeight frame getHeight 2 frame setVisible true Page 340f34 DataPaq Remote Control User Manual
23. hen send an empty line followed by OK r n Errors ERR10 Image number cannot be parsed typically because it is not an integer ERR12 No image available because no scan was run after DataPag started up ERR22 Scale factor cannot be parsed typically because it is not an Integer or a double ERR25 Image format was not one of png jpeg or bmp Example Received by Server LAST IMAGE 0 r n Response from Server lt A Number of base64 encoded lines containing the image gt lt A blank line gt OK r n Save Last Raw Image Command SAVE_LAST RAW IMAGE lt Location to save file gt r n Response OK r n Upon receiving this command the server will retrieve the last image scanned for the current position encode the image as a png and save it to the location specified in the second parameter Should the filename contain spaces wrap the filename in double quotes to escape the spaces Note that this is the raw image from the imaging device and is therefore rather large Once the entire image has been sent DataPag will then send OK r n Page 140f34 DataPaq Remote Control User Manual E AE Opg PRACTICAL INNOVATION Errors ERR12 No image available ERR16 not enough param because no scan was run after DataPag started up eters supplied ERR17 Image cannot be saved unusually due to either a bad file name or permission problems with the file location S
24. hould there be no image available because no scan was run after DataPag started up DataPag will return ERR12 Should the incorrect parameters be returned DataPag will return ERR16 ERR17 is returned if the image cannot be saved unusually due to either a bad file name or permission problems with the file location Example Received by Server image png r n Response from Server OK r n e Close Command CLOSE r n Response OK r n SAVE LAST IMAGE 0 c Users benn datapaq Upon receiving this command the scanner will close the client which requested the close To cleanly disconnect your not affect any other clients Example Received by Server CLOS client it is recommended to call this method Note that this will attached to DataPag at the time E r n Response from Server OK r n_ The server disconnects the client e Shutdown Command SHUTDOWN r Response OK r n n DataPaq Remote Control User Manual Page 15 of 24 E mz PRACTICAL INNOVATION iel Upon receiving this command the scanner will shutdown and the server process will exit but only if the scanner is idle Should the scanner fail to shut down ERR r n will be written followed by a description of the error message however should this happen the Server will still shutdown except in the case of the server being busy Example Received by Server SHUTDOWN r n Response fro
25. ill be scaled otherwise it will be scaled to 1 The format can be png jpeg or bmp if not supplied a png image will be returned Once the entire image has been sent DataPaq will then send an empty line followed by OK r n Errors ERR10 Image number cannot be parsed typically because it is not an integer ERR12 No image available because no scan was run after DataPaq started up ERR16 not enough parameters supplied at least the image number must be supplied ERR22 Scale factor cannot be parsed typically because it is not an Integer or a double ERR25 Image format was not one of png jpeg or bmp Example Page 120f34 DataPaq Remote Control User Manual E mz PRACTICAL INNOVATION iel Received by Server LAST_IMAGE 0 0 5 jpeg r n Response from Server lt A Number of base64 encoded lines containing the image gt lt A blank line gt OK r n e Save Last Image Command SAVE_LAST IMAGE lt The Scanned Position starting at 0 gt lt Location to save file gt lt the scale factor optional gt lt format optional gt r n Response OK r n Upon receiving this command the server will retrieve the last image scanned for the current position annotate the image encode the image as a png and save it to the location specified in the second parameter Should the filename contain spaces wrap the filename in double quotes to escape the spaces Once the entire imag
26. ing JLabel import sun misc BASE64Decoder An example class showing connection to DataPaq via a socket Note that this class writes a lot of information to standard out System out as it is example code It is recommended that a logging framework be used to replace these System out calls author Neil Benn version 1 2 y public class DataPAgRemote private BufferedReader in null private OutputStream out null private String host private Integer port private static final Integer DATAPAQ SERVER_PORT 8888 private static final String DATAPAQ SERVER HOST localhost Initialises and connects to the DataPaq scanner DataPaq Remote Control User Manual Page 29 of 24 Peter i PRACTICAL INNOVATION throws UnknownHostException throws IOException public DataPagRemote String host Integer port throws UnknownHostException IOException create the socket incoming and outgoing streams this host host this port port Socket clientSocket new Socket this host this port out clientSocket getOutputStream in new BufferedReader new InputStreamReader clientSocket getInputStream this is returned on each connection System out println in readLine Returns the version number of the running DataPag server return throws IOException 7 public String getVersion throws IOException get the version number out writ
27. ived by Server IS SCANNER CONNECTED FOR UID 96deep r n Response from Server TRUE r nOK r n DataPaq Remote Control User Manual Page 21 of 24 a 12 Fa O Freire i PRACTICAL INNOVATION e Activate Plate Remote Command ACTIVATE PLATE REMOTE r n Response lt CURRENT BARCODE gt r nOK r n Upon receiving this command DataPag will turn on the activator and if a plate is placed on the scanner then the text PLATE_PRESENT lt RACK BARCODE gt will be fired on the notificiation port If there is no Ziath Linear Reader enabled then ERR32 will be thrown Example Received by Server ACTIVATE_PLATE_REMOTE r n Response from Server ZIA6986765 r nOK r n e Deactivate Plate Remote Command DEACTIVATE PLATE REMOTE r n Response OK r n Upon receiving this command DataPag will turn off the activator and if a plate is placed on the scanner then nothing will happen Example Received by Server DEACTIVATE_PLATE_REMOTEN r n Response from Server OK r n e_ Is Activator Plate Remote Command IS_ ACTIVATOR PLATE REMOTE r n Response lt TRUE FALSE gt r nOK r n Upon receiving this command DataPag return true if the activator is set to record the prescence of a plate false if not Example Received by Server IS_ACTIVATOR_PLATE_REMOTE r n Response from Server TRUE r nOK r n e Activate Scan Remote Command ACTIVATE SCAN _REMOTE r n
28. k no notifications of each well decoded will be sent Example Received by Server DISABLE DECODE UPDATES r n DataPaq Remote Control User Manual Page 19 of 24 a 12 Fa Pets i PRACTICAL INNOVATION Response from Server OK r n e Is Decode Updates Command IS DECODE UPDATES r n Response lt TRUE FALSE gt 0K r n If DataPaq is set to return decode updates when a tube is decoded this will return TRUE if not then FALSE will be returned Example Received by Server IS DECODE UPDATES r n Response from Server FALSE r nOK r n e Get Current Number of Connections Command GET CURRENT NUMBER OF CONNECTIONS r n Response lt the number of currently connected clients gt r nOK r n Upon receiving this command DataPaq will return the number of currently connected clients including this client Example Received by Server GET CURRENT NUMBER OF CONNECTIONS r n Response from Server 2 r nOK r n e Get Connected Scanners Command GET CONNECTED SCANNERS r n Response lt as list of the connected scanners gt r nOK r n Upon receiving this command DataPag will return a list of connected scanners delimited by pipes If no scanners are connected NONE will be returned The possible scanner identifiers that could be returned are DEEP_FOCUS this is version 1 and version 2 HIGH_ SPEED this is version 1 of
29. m Server OK r n The scanner shuts down OK r n e Force Shutdown Command FORCE _SHUTDOWN r n Response OK r n Upon receiving this command the scanner will shutdown and the server process will exit even if the scanner is running use this command with caution Should the scanner fail to shut down ERR r n will be written followed by a description of the error message however should this happen the Server will still shutdown Example Received by Server SHUTDOWN r n Response from Server OK r n The scanner shuts down OK r n e Get Barcode Scanner Com Port Command GET BARCODE SCANNER COM PORT r n Response COM5 r nOK r n When receiving this command DataPag report the com port used by the 1D barcode rack scanner Should the port not be set then ERR21 will be returned Example Received by Server GET BARCODE SCANNER COM PORT r n Response from Server COM5 r nOK r n e Get Al Com Port IDs Command GET ALL COM PORT IDS r n Response COM1 COM3 COM4 COM5 r nOK r n Page 160f34 DataPaq Remote Control User Manual E iel O Freir i PRACTICAL INNOVATION When receiving this command DataPaq reports the com ports on the host computer with each port name separated by a comma Example Received by Server GET ALL COM PORT IDS r n Response from Server COM1 COM3 COM4 COM5 r nOK r n e Set Barcode Scanner Com Port Command SET BARCODE SCANNER
30. onse true r n When receiving this command DataPaq returns the state of the barcode scanner enabled disabled flag If enabled true is returned otherwise false is returned Example Received by Server GET BARCODE SCANNER _ENABLED r n Response from Server true r nOK r n e Scan Linear Barcode Command SCAN LINEAR BARCODE r n Response lt BARCODE gt r nOK r n Upon receiving this command the 1D rack scanner will attempt to scan a 1D rack barcode using the ZTS 1DR attached reader If no barcode could be read ERR13 will be returned ERR14 is returned when the barcode scanner cannot be communicated to hardware linear scanner only and ERR15 when neither the hardware or Ziath linear barcode scanner are enabled Example Received by Server SCAN LINEAR BARCODE r n Response from Server B1268FR r nOK r n e Clear Last Detailed Exception Command CLEAR_LAST DETAILED EXCEPTION r n Response OK r n This command will remove the last detailed exception on the server note that this is the last detailed exception across all clients and not just this connected one If there is no exception this will just return Example Received by Server CLEAR LAST DETAILED EXCEPTION r n Response from Server OK r n Page 18 0f 34 DataPaq Remote Control User Manual E O Freire i PRACTICAL INNOVATION a Decode Image
31. rt that the server will listen on N notificationPort port number 8686 The port that the notification server will transmit messages on Once the server is running in socket mode the process will continue to listen to the socket until it is either closed or receives the command SHUTDOWN Note that there is a maximum number of simultaneous client connections the amount can be discovered by calling GET_MAX_CONNECTIONS If this number is exceeded a string describing the current connections is returned and the socket closed fomr the serer side An example of a command line to start the server is below Server s p 8899 This will start the server running in socket mode which will listen for incoming connections on port 8899 The server responds to a set of commands all commands must be terminated by a carriage return and a line feed all responses will be terminated with a carriage return and a line feed Should you need to close the server down and for some reason the server is not responding then if you connect to port 6699 then the server will immediately close down and close the connection This is designed to be an emergency shutdown and should not typically be used to close the server In addition if the Ziath Linear reader is attached the presence of a plate can be automatically detected and this be notified and or a scan automatically triggered This notification is done on port 8686 this can be changed using the n p
32. sticated example follows Server g 1234 f results xls e excel b COD E1 COD R2 COD E3 This will execute the scanner using the codes CODE1 to CODE3 as the rack barcodes The results will be returned into an excel file which is called results xls When the process exits it returns an exit code The number returned gives an indication of the success of the command Exit code 0 the process executed and returned cleanly no errors occurred Exit code 1 the command line options could not be specified Exit code 2 the specified port for server mode see below could not be opened Exit code 3 the plate group was not specified Exit code 4 the execution of the scan or calibrate failed Exit code 5 the result file could not be written Server Mode Page 6o0f34 DataPaq Remote Control User Manual E iel O Freire i PRACTICAL INNOVATION The server mode starts DataPaq and listens on a specified port for incoming commands Multiple clients can attach to DataPaq however only one operation at a time can be performed If starting in server mode you need to specify the command line option s server for longform DataPag will start and listen to a specified port for commands by default the server will listen on port 8888 however this can be changed with the following command Short Form Long Form Params Default Description P commandPort port number 8888 The po
33. the high speed scanner HIGH_SPEED_2 this is version 2 of the high speed scanner Page 200f34 DataPaq Remote Control User Manual E iel O Freire i PRACTICAL INNOVATION MULTIRACK_8800 this is version 1 of the multirack scanner MULTIRACK_9000 this is version 2 of the multirack scanner PLUSTEC_A3 this is a specialist extra large scanner CAMERA lt This is the express scanner If for some reason this list cannot be returned error 33 is thrown Example Received by Server GET_CONNECTED_SCANNERS r n I Response from Server CAMERA DEEP_ FOCUS r nOK r n e Is Scanner Connected for Uid Command IS SCANNER CONNECTED FOR_UID r n Response TRUE r nOK r n Upon receiving this command DataPaq will return true if the scanner required for scan the uid is connected and false if it is not If no uid is given ERR27 will be returned and if the uid is not known then ERR26 is returned Example Received by Server IS_SCANNER_CONNECTED FOR UID 96deep r n Response from Server TRUE r nOK r n e Is Orientation Barcode for Uid Command IS ORIENTATION BARCODE FOR_UID r n Response TRUE r nOK r n Upon receiving this command DataPag will return true if the uid has an orientation barcode configured and false if it is not If no uid is given ERR27 will be returned and if the uid is not known then ERR26 is returned Example Rece
34. ver receives this command it will return all the UIDs in the system The return will be the UID followed by the plate group name separated by a pipe Each DataPaq Remote Control User Manual Page 9 of 24 E iel O Freire ia PRACTICAL INNOVATION line is terminated by a carriage return and a line feed and signifies a new plate group the final line is OK followed by a line feed and carriage return Example Received by Server GET_UIDS r n Response from Server 1 Single Plate Standard Focus 96 Well Plate r n 2 Single Plate Standard Focus 48 Well Plate r n 5 Single Deep Standard Focus 96 Well Plate r n OK r n e Status Command STATUS r n Response lt status gt r nOK r n When the server receives the command it returns the status of DataPaq These can be as follows o IDLE DataPag is ready to accept a command o BUSY DataPag is currently executing a command o ERROR DataPag encountered an error it will keep this status until a command is successfully executed Example Received by Server STATUS r n Response from Server IDLE r nOK r n e Scan Command SCAN lt uid of group to scan gt lt export format gt lt comma separated list of rack barcodes gt r n Params o uid this is the unique id of the scanner group This can either be manually set in the DataPag config file or can be specified using the DataPag GUI
Download Pdf Manuals
Related Search
Related Contents
Philips myLiving Spot light 56222/48/16 Alvogyl Alvogyl Leading Edge MACH30P Use and Care Manual User Manual CableWholesale 25ft, 3xRCA - 3xRCA Samsung SMART CAMERA NX200 Bruksanvisning prolif l8 - Agrytec.com MODULO FM-DSL MODULE INSTALLATION "user manual" Home Decorators Collection 0823200910 Instructions / Assembly Copyright © All rights reserved.
Failed to retrieve file