The text of a manual · part 11 of 12
EZBuilder Tutorial, pages 101 to 110
Pages 101 to 110 of 114
The original document is the PDF (3.0 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Intermec 2420, Intermec 2425 and Intermec 2481
Page 101
Using EZBuilder Features
A
Transmitting a File from a Trakker Antares TCP/IP Terminal to a TFTP Server Using Static Filenames Trakker Antares TCP/IP terminals running firmware version 2.2 and above contain a Trivial File Transfer Protocol (TFTP) client. The host must also be running a TFTP server application. This exercise uses EZ-TFTP from Softech. A 30-day trial version is available on the Softech Web site. This section describes how to set up a keypress action to begin a file transfer. The method described here can only transmit files. The filenames are static - they must be set at compile time and cannot be changed at runtime. The EZBuilder application created for this example is on the EZBuilder CD-ROM with the filename EZTFTP1.IMP. To create and populate a data file for transmission from EZBuilder 1. Start EZBuilder. 2. Choose New Application from the File menu. 3. Choose New Screen from the File menu. 4. Choose Add File from the File menu to receive data that will be written to a file. 5. Set the following properties: Display Attribute Data Type
INVERSE.
String.
Display Only False. Visible True. Note: Add labels as desired to identify the screen or field. 6.
Click the On Entry tab.
7.
Set the Clear Field action to True.
8.
Choose New Transaction from the File menu to create a transaction. Write the contents of the field to the file C:EZTFTP.DAT.
9.
Click Transfer Direction, and then click the field button to access the Transaction Direction Editor.
10.
Set the following parameters: Direction box
Click Transaction To.
Source/Destination box
Click File and select or enter C:EZTFTP.DAT.
A-17
Page 102
EZBuilder Tutorial
11.
Click OK.
12.
Double-click the data field name to copy the data field from the Available Fields list to the Transaction Fields.
13.
Choose Screen: Screen0 from the Object List.
14.
Double-click the input field in the Viewport.
15.
Click the On Exit tab.
16.
Set Do Transaction to Tran0 (the transaction you created earlier).
17.
Click the KP/Events tab, and then click F10.
18.
Click the field button to access the Key Action Selection Editor.
19.
Click Send File to Controller and select the file C:EZTFTP.DAT.
20.
Click OK.
21.
Build the application and download it to the terminal.
22.
Start the TFTP server, configure the terminal for the host IP address of the TFTP server, and run the application. Note: If you are using EZ-TFTP, you do not need to configure a port number on the Trakker Antares terminal.
A-18
Page 103
Using EZBuilder Features
23.
A
You can now populate a data file by entering data in the input field and pressing the enter key. Once the data file is populated, press F10 to trigger the key action, Send file to Controller. If the transfer is successful, no feedback appears in the EZ-TFTP Server window; however, if the transfer fails, a status message is displayed on the bottom line. In this example, the file was successfully sent to the server.
Transferring Files Between a Trakker Antares TCP/IP Terminal and a TFTP Server Trakker Antares TCP/IP terminals running firmware version 2.2 and above contain a Trivial File Transfer Protocol (TFTP) client. The host must also be running a TFTP server application. This exercise uses EZ-TFTP from Softech. A 30-day trial version is available on the Softech Web site. This example application starts a transmit or receive by pressing a key. Using the approach described here, the application can transmit and receive files with names that are set at compile time. The names cannot be changed during runtime. The EZBuilder application created for this example is on the EZBuilder CD-ROM with the filename EZTFTP2.IMP. To transfer files using static filenames 1. Start EZBuilder and choose New Application from the File menu. 2. Choose New Screen from the File menu. 3. Create a data input field to receive data that is written to a file, and set the following properties: Display Attribute Data Type
INVERSE.
String.
Display Only False. Visible True. 4. Click the On Entry tab, and set Clear Field to True. 5. Click the On Exit tab.
A-19
Page 104
EZBuilder Tutorial
6. Double-click Do Transaction to create a new transaction. 7. Click Transfer Direction, and then click the field button to access the Transaction Direction Editor. 8. Set the following properties: Direction box
Click Transaction To.
Source/Destination box
Click File and select or enter C:DATA.TXT.
9. Copy the data field and any desired system fields from the Available Fields list to the Transaction Fields list. 10. In the Object Manager, select Screen0 from the Object List. 11. In the Viewport, double-click the input field. •
Click the On Exit - On Val Fail tab and set Navigation Choice to <Current Field>.
•
Click the On Exit - On Val Succeed tab and set Navigation Choice to <Current Field>.
12. Create two new fields with the following settings: Display Attribute
Set to NORMAL for both fields.
Display Only Set to True for both fields. This prevents the cursor from staying in the fields. Visible Set to False for both fields. Since these are dummy fields, they do not need to be displayed. 13. While one of the new fields is the active object, click the On Exit tab. 14. Click File Actions, and then click the field button to access the File Actions Editor dialog box.
15.
Enter the following information: File Name
A-20
Select or enter the name of the file to transmit.
Page 105
Using EZBuilder Features
A
Action Select the operation Send File to Net/Controller. Error Actions
Click Return Success and Continue.
16. Click Add Line. The following line appears in the status window: c:data.txt: Send file to Net/Controller; On Error Continue Success Status
17. Click OK. 18. Click the On Exit tab, then click the On Val Fail tab, and then set the following properties and actions: Message Enter the failure message you want to appear at the bottom of the screen in case of an error. Beep Set to <ERROR>. Navigation Choice Set to go to the data input field. 19. Click the On Val Succeed tab and set the following properties and actions: Message Enter the success message you want to appear at the bottom of the screen if the operation is successful. Beep Set to <SUCCESS>. Navigation Choice Set to go to the data input field. 20. Go to the second new field and create a similar file action by repeating Steps 11-17. Note: In the File Actions Editor, set the Action field to Receive File From Net/Controller. 21. Make the data input field the active object and click the KP/Events tab. 22. Select a key to trigger the transmit. For example, click F1 and then click the field button to access the Key Actions Editor. Go To Field Click and select or enter Screen0.Field1 (the field that was set up previously for transmit). 23. Click OK. 24. Select another key to trigger the receive. For example, click F5 and then click the field button to access the Key Actions Editor.
A-21
Page 106
EZBuilder Tutorial
Go To Field Click and select or enter Screen0.Field2 (the second field that was set up previously for transmit). 25. Build the application and download it to your terminal. 26. Start the TFTP server and configure the terminal for the Host IP address and run the application. Note: If you are using EZ-TFTP, you do not need to configure a port number on the terminal. 27. You can now populate a data file by entering data into the input field and pressing the enter key. Once the file is populated, press F1 or F5. These key actions send the cursor to one of the invisible fields. Since the fields are Display Only, the cursor will exit the field immediately. Upon exit, the File Action - Send File to Net/Controller or Receive File from Net/Controller is executed. The error or success message you defined appears at the bottom of the screen. Check the TFTP server to make sure the file transfer was successful.
Transferring Files Between a TCP Server and a Trakker Antares TCP/IP Terminal Using Dynamic Filenames Trakker Antares TCP/IP terminals running firmware version 2.2 or higher contain a Trivial File Transfer Protocol (TFTP) client. The host must also be running a TFTP server application. In this exercise we will set up a keypress action that begins the file transfer. The method described here can only transmit files. The EZBuilder application created for this example is on the EZBuilder CD-ROM with the filename EZTFTP3.IMP. To build an application 1. Start EZBuilder and choose New Application from the File menu. 2. Choose New Screen from the File menu. 3. Create two data input fields, one for the terminal filename and the other for the TFTP server filename.
A-22
Page 107
Using EZBuilder Features
A
4. Name the fields TrakkerName and ServerName, respectively. Add any desired labels to the screen.
5. Create two more fields. These are dummy fields and are invisible so you can place them anywhere on the screen. Name these fields tx_status and rx_status, respectively.
6. Set the following properties for the two new fields: Display Only
True.
Display Attribute
NORMAL.
Visible False. These settings hide the fields and enable the cursor to skip through each field without waiting for input. These fields are created to control when files are transmitted and received. 7. Double-click Trakker Filename in the Viewport, and then click the On Exit tab. 8. Click the On Val Fail tab.
A-23
Page 108
EZBuilder Tutorial
9. Click Navigation Choice, and then click the field button to access the Navigation Selection window. 10. Click Go to Field and select or enter the ServerName field. Click OK. 11. Click the On Val Succeed tab and repeat Steps 6-8. 12. Double-click ServerName, and then click the On Exit tab. 13. Click the On Val Fail tab, click Navigation Choice, and then click the field button. 14. In the Navigation Selection window, click Go to Field and select or enter the TrakkerName field. Click OK. 15. Click the On Val Succeed tab and repeat Steps 14-15. 16. In the Viewport, double-click the TrakkerName field, and click the KP/Events tab. 17. Select a key to trigger the transmit. For example, click F1, and then click the field button to access the Key Action Selection Editor. Click Go To Field and select or enter the tx_status field. Click OK when you have finished. 18. Select a key to trigger the receive. 19. For example, click F5 and then click the field button. 20. In the Key Action Selection Editor, click Go To Field and select or enter the rx_status field. Click OK. 21. In the Viewport, double-click the ServerName field and repeat Steps 17-22. 22. Double-click the tx_status field, and then click the On Exit tab. 23. Click the Validation tab, and then click User Function. 24. Click the field button to access the User Function Editor. 25. Enter the following line into the editor: IM_ISGOOD(im_transmit_file(Screen0_TrakkerName_F,Screen0_Serve rName_F));
Note: im_transmit_file() is a Trakker Antares PSK function. It takes two arguments, the source filename of the terminal file and the destination filename to use on the server. im_transmit_file() returns a status code. This status code is used as input to the Trakker Antares PSK macro. im_isgood returns a code that EZBuilder can use to determine success or failure. If im_isgood is not used, EZBuilder gets the status backwards. Click OK when you have finished.
A-24
Page 109
Using EZBuilder Features
A
26. Click the On Val Fail tab, click Message, and enter the message you want displayed in case of transmission failure. 27. Click Beep and select a failure beep sequence. 28. Click Navigation Choice, and then click the field button to access the Navigation Selection window. 29. Click Previous Field, and then click OK. 30. Click the On Val Succeed tab, click Message, and enter the message you want displayed for a successful transmission. 31. Click Beep and select a successful beep sequence. 32. Click Navigation Choice and then click the field button. 33. In the Navigation Selection window, click Previous Field, and then click OK. 34. Double-click the rx_status field, click the On Exit tab, and click User Function. 35. Click the field button to access the User Function Editor. 36. Enter the following line into the editor: IM_ISGOOD(im_receive_file(Screen0_TrakkerName_F,Screen0_Server Name_F));
Note: im_receive_file() is a Trakker Antares PSK function. It takes two arguments, the source filename of the terminal file and the destination filename to use on the server. im_receive _file() returns a status code. This status code is used as input to the Trakker Antares PSK macro. im_isgood returns a code that EZBuilder can use to determine success or failure. If im_isgood is not used, EZBuilder gets the status backwards. Click OK when you have finished. 37. Click the On Val Fail tab, click Message, and enter the message you want displayed in case of transmission failure. 38. Click Beep and select a failure beep sequence. 39. Click Navigation Choice, and click the field button. 40. Click Previous Field, and click OK. 41. Click the On Val Succeed tab, click Message, and enter the message you want displayed in case of a successful transmission. 42. Click Beep and select a successful beep sequence. 43. Click Navigation Choice, and then click the field button. 44. Click Previous Field, and then click OK. 45. Build the application and download it to the terminal. 46. Start the TFTP server.
A-25
Page 110
EZBuilder Tutorial
47. Configure the terminal for the host IP address of the TFTP server. Note: If you are using EZ-TFTP, you do not need to configure a port number on the terminal. •
To send a file, enter the name of the Trakker Antares file you are sending and the destination name of the file on the server. Press F1.
•
To receive a file, enter the filename of the file on the server and the destination filename on the terminal. Press F5.
Note: Both of the data input fields have key actions to send the cursor to one of the invisible fields. Since these fields are display only, the cursor will enter and then exit the field. Upon exit of the field, the appropriate User Function (im_transmit_file() or im_receive_file()) is executed. When the function is complete, EZBuilder beeps and displays the message you entered based on the success or failure of the transfer. The cursor returns to one of the data input fields.
A-26