Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 8 of 10

DuraTrax & LaserLite Hardware Manual, pages 71 to 80

Pages 71 to 80 of 94

The original document is the PDF (1.1 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.

For the Videx DuraTrax and Videx LaserLite

Page 71

5.

Videx Download executes the commands listed in the text file: it unlocks the unit, changes the ID to what is listed after the C command (in this case, 12345), and then relocks the unit.

6.

Remove your data collector from the Base Station slot; your data collector is ready to use.

To continue changing other data collector’s IDs: 1.

Reopen the text file.

2.

Change the ID listed after the C command by selecting 12345 and typing in a new ID. (Note: There must be a space character between the C and the ID.)

3.

Save and close the text file. Remember, the text file must have a .txt extension.

4.

Insert a data collector into the Base Station slot.

5.

Click and drag the edited text file to the Videx Download icon.

6.

Videx Download executes the commands listed in the text file: it unlocks the unit, changes its ID to what is listed after the C command, and then relocks the unit.

7.

Continue these same steps until you have assigned a unique ID to each of your units.

Note: Keep a list of the IDs you are using to identify your data collectors. You will use this list in the next section “Transferring Data from Multiple Data Collectors.”

Appendix E Using Multiple Data Collectors and Base Stations

63

Page 72

Transferring Data From Multiple Data Collectors To transfer data from a group of data collectors in one transfer process, you must: 1. Create a commands text file that uses either the FOREVER, FOREACH, or FORALL looping commands to transfer the data from the data collectors. (Note: The commands file must have a .txt extension.) 2. Insert all of the data collectors into their Base Stations. 3. Click and drag the commands text file onto the Vxcomm.exe (Vxcomxxx.exe) icon if using Windows, enter the name of the commands text file on the Download.exe command line if using DOS, or click and drag the commands text file onto the Videx Download icon if using Macintosh. The three looping commands provide transfer methods for three different situations. The FOREVER loop is useful if you have a computer dedicated to transferring the data from the data collectors; the FOREACH loop is useful if you will be transferring the data from only a portion of your data collectors; and the FORALL loop is useful if you require that all of the data collectors be transferred during the process. The following table describes the looping commands: FOREVER

For use with a computer that is dedicated to transferring data. This loop will transfer the data from any data collector it locates. This loop attempts to execute commands within a loop indefinitely.

FOREACH

This loop will search for each data collector in the list of IDs. If it locates the data collector with the ID, it executes the commands within the loop once; if it does not locate the data collector with the ID, it goes on to the next ID. This loop attempts to execute commands within a loop once for each ID listed.

FORALL

This loop will look for each listed data collector’s ID until it has located and transferred the data from each ID in the list. This loop attempts to execute commands within a loop indefinitely, until all listed IDs have been located.

64

Appendix E Using Multiple Data Collectors and Base Stations

Page 73

FOREVER Looping Command The following example shows how the FOREVER loop is used in a commands text file to continually look for data collectors to transfer. Example FOREVER Commands File: Example: FOREVER I 0000000000 M1 Transferring Data S Z T G END

'Begin the loop. 'Unlock any unit. 'Put message on unit’s display. 'Transfer data from unit. 'Clear data from unit. 'Set time by computer’s time. 'Restart the application. 'End loop, begin re-executing at top.

Note on the unlock command (I id): No additional characters should be included on the same line as the unlock command. Any characters after the unit ID (for example, space characters or comments) will cause this command to fail. In the above example, the comment associated with the unlock command is on a separate line.

Appendix E Using Multiple Data Collectors and Base Stations

65

Page 74

FOREACH Looping Command The following example shows how the FOREACH loop is used in a commands text file to attempt to transfer the data from each data collector in the list once. Example FOREACH Commands File: You can either list the IDs individually as in the first line of Example 1, or you can make a text file of the IDs and use the filename in quotes as on the first line of Example 2. Example 1 Commands Text File for Transferring Data from Multiple Data Collectors (IDs listed on command line): FOREACH ID1, ID2, ID3 I loop_id M1 Transferring Data S Z T L END

'Begin the loop. All IDs listed on line. 'Unlock the unit using the special 'identifier. This identifier substitutes 'for 'all the units listed on the first line. 'Put message on unit’s display. 'Transfer data from unit. 'Clear data from unit. 'Set time by computer’s time. 'Lock the unit and put it to sleep. 'End loop, begin re-executing at top.

Note on the loop_id argument: When the argument of the unlock command is a specific ID (as in the previous FOREVER example), the program attempts to unlock the unit eight times at five second intervals. This ensures that a unit is unlocked regardless of its sleep cycle (a unit sleeps for 25 seconds, then wakes for 5 seconds). If the program does not unlock a unit, the program returns an error and aborts. On the other hand, when the argument of the unlock command is loop_id (as in the FOREACH example), the program only makes one attempt to unlock the unit. If it is successful, it performs the remaining commands in the loop; if not successful, it moves on to the next value for loop_id without aborting the program. Given the unit’s sleep cycle, it is unlikely that one attempt will successfully unlock a unit. Therefore, it would generally not be reasonable to use a FOREACH loop by itself as in the above

66

Appendix E Using Multiple Data Collectors and Base Stations

Page 75

example. For examples showing appropriate use of a FOREACH loop, refer to the discussions of Scenarios 3 and 4 on pages 70–72. Example 2 Commands Text File for Transferring Data from Multiple Data Collectors (IDs listed in IDs.txt file): FOREACH "IDs.txt" I loop_id M1 Transferring Data S Z T L END

'Begins the loop. All IDs listed in 'the IDs.txt file. 'Unlock the unit using the special 'identifier. This identifier substitutes 'for 'all the units listed on the first line. 'Put message on unit’s display. 'Transfer data from unit. 'Clear data from unit. 'Set time by computer’s time. 'Lock the unit and put it to sleep. 'End loop, begin re-executing at top.

The IDs.txt file must contain a list of the IDs. The IDs in the text file must be separated by commas or spaces.

Appendix E Using Multiple Data Collectors and Base Stations

67

Page 76

FORALL Looping Command The following two examples show how the FORALL loop is used in a commands text file to transfer the data from each data collector in the list. Example FORALL Commands File: You can either list the IDs individually as in the first line of Example 1, or you can make a text file of the IDs and use the filename in quotes as on the first line of Example 2. Example 1 Commands Text File for Transferring Data from Multiple Data Collectors (IDs listed on command line): FORALL ID1, ID2, ..., IDN I loop_id M1 Transferring Data S Z T L END

'Begins the loop. All IDs are listed on 'this line. 'Unlock the unit using the special 'identifier. This identifier substitutes 'for 'all the units in the IDs.txt file. 'Put message on unit’s display. 'Transfer data from unit. 'Clear data from unit. 'Set time by computer’s time. 'Lock the unit and put it to sleep. 'End loop, begin re-executing at top.

Example 2 Commands Text File for Transferring Data from Multiple Data Collectors (IDs listed in IDs.txt file):

68

Appendix E Using Multiple Data Collectors and Base Stations

Page 77

FORALL "IDs.txt" I loop_id M1 Transferring Data S Z T L END

'Begin the loop. 'Unlock the unit using the special 'identifier. This identifier substitutes 'for 'all the units in the IDs.txt file. 'Put message on unit’s display. 'Transfer data from unit. 'Clear data from unit. 'Set time by computer’s time. 'Lock the unit and put it to sleep. 'End loop, begin re-executing at top.

The IDs.txt file must contain a list of the IDs. The IDs in the list must be separated by commas or spaces.

Appendix E Using Multiple Data Collectors and Base Stations

69

Page 78

In order to clarify the functioning of these different looping structures, it is helpful to consider four different scenarios for downloading multiple units. Scenario #1: The user has multiple data collectors to download, but only one at a time will be put in the Base Station or in front of the JetEye. A computer is dedicated to downloading the data collectors as they become available. In this situation, the units do not need to be assigned individual IDs and a FOREVER loop can be used: FOREVER I 0000000000 M1 Transferring Data S Z T L END This loop will continue indefinitely, unlocking any data collector which is available. It is important that only one unit at a time be in the Base Station or in front of the JetEye when using this looping structure. This loop will unlock any data collector; if more than one data collector is unlocked at a time, communications will fail. Scenario #2: The user has multiple data collectors to download. Some or all of them may be in the Base Station at any time. Each of the units must be downloaded exactly one time. A computer is dedicated to downloading the units as they become available. In this situation, each unit must be assigned a unique ID and the FORALL loop can be used: FORALL "IDs.txt" I loop_id M1 Transferring Data S Z T L END 70

Appendix E Using Multiple Data Collectors and Base Stations

Page 79

This loop will continue until each unit in the IDs.txt file has been downloaded once. Multiple units can be in the Base Station at one time because only one unit will be unlocked at a time. Scenario #3: The user has multiple data collectors to download. Some or all of them may be in the Base Station at any time. Each unit is to be downloaded when it is placed in the Base Station; some of the units may be downloaded more than one time. A computer is dedicated to downloading the units as they become available. In this situation, each unit must be assigned a unique ID and a FOREACH loop nested inside a FOREVER loop can be used: FOREVER FOREACH "IDs.txt" I loop_id M1 Transferring Data S Z T L END END This loop will continue indefinitely, continually attempting to unlock any units contained in the IDs.txt file. Unlike the FORALL loop in Scenario #2, this loop will continue attempting to download a data collector even after it has been successfully downloaded one time.

Appendix E Using Multiple Data Collectors and Base Stations

71

Page 80

Scenario #4: The user has multiple data collectors to download; all of the units to be downloaded are in their Base Stations. However, some of the units (listed in the IDs.txt file) are not available to download. If the computer is unable to unlock a particular unit, the computer will stop trying to unlock that unit. In this situation, each unit must have a unique ID and a FOREACH loop can be used: FOREACH "IDs.txt" I loop_id M1 Transferring Data S Z T L END As was explained in the earlier discussion of the FOREACH loop, when the argument of the unlock command is loop_id, the program only makes one attempt to unlock the unit. Given the unit’s sleep cycle, it is unlikely that one attempt will successfully unlock a unit. However, it is possible to ensure that each unit is awake when the program attempts to unlock it. This is done by placing six unused IDs at the beginning of the IDs.txt file (Figure E-2). Dummy1 Dummy2 Dummy3 Dummy4 Dummy5 Dummy6 ValidID1 ValidID2 ValidID3 ValidID4 Figure E-2 Sample IDs.txt File

72

Appendix E Using Multiple Data Collectors and Base Stations