The text of a manual · part 9 of 25
MHI-2000 Technical Reference Manual: CHAPTER 5 Host Commands & Downloads, pages 61 to 68
Pages 61 to 68 of 207, from MHI-2000 Technical Reference Manual
The original document is the PDF (2.6 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 Sick MHI2000
Page 61
Control Commands from the Host
ASCII = Command - Enabling Relay Control Outputs When sent over STARNODE or TCP/IP, use this format =NNN. When sent serially and the default MESSAGE CHARACTER is ~, use this format ~=NNN~. The solid-state control outputs can be enabled by downloading the ASCII = (equal sign; decimal 61; hexadecimal 3D) command. Message Format - =NNN Where: NNN - The output to enable in accordance with the following: –
001 for output 1
–
002 for output 2
–
004 for output 3
–
008 for output 4
–
016 for output 5
–
032 for output 6
–
064 for output 7
–
128 for output 8
5 Host Commands & Downloads
•
To enable outputs in combination, enter the sum of the individual output values. For example, entering 007 will enable the first three outputs. Entering 255 will enable all eight outputs. When the RLYHLD (relay hold) time for an output is non-zero, that output will automatically disable at the end of the hold time. When the RLYHLD is zero, the output will remain enabled. By sending a 0 as the parameter NNN, it is possible to suspend all relay hold countdowns, so that the outputs will not switch back to their disabled state).
Example ~=0~ Suspend Relay Hold Countdowns The current states of the outputs (enabled or disabled) will not be directly affected by sending a 0.
Example Downloading the string ~=004~ over the Host or Setup port will enable output 3.
Rev A, January 2002
MHI-2000 Technical Reference Manual
5-9
Page 62
Chapter
5
Host Commands & Downloads
ASCII > Command - De-Energizing Relay Control Outputs When sent over STARNODE or TCP/IP, use this format >NNN. When sent serially and the default MESSAGE CHARACTER is ~, use this format ~>NNN~. The solid-state control outputs can be de-energized by downloading the ASCII > (greater-than sign; decimal 62; hexadecimal 3E) command. Message Format - >NNN Where: •
NNN - The output to disable in accordance with the following: –
001 for output 1
–
002 for output 2
–
004 for output 3
–
008 for output 4
–
016 for output 5
–
032 for output 6
–
064 for output 7
–
128 for output 8
To disable outputs in combination, enter the sum of the individual output values. By sending a single 0 as the parameter NNN, it is possible to resume all relay hold countdowns, so that the outputs will switch back to their disabled states at the end of their Relay Hold Countdowns.
Example ~>0~ Resume Relay Hold Countdowns The current states of the outputs, enabled or disabled, will not be directly affected by sending a 0.
Example Downloading the string ~>004~ over the Host or Setup port will disable output 3.
5-10
MHI-2000 Technical Reference Manual
Rev A, January 2002
Page 63
Control Commands from the Host
ASCII ? Command - Setup When sent over STARNODE or TCP/IP, use this format ?x, ?99y, or ?9z. When sent serially and the default MESSAGE CHARACTER is ~, use this format ~?x~, ~?99y~, or ~?9z~. The ASCII ? (question mark; decimal 63; hexadecimal 3F) command tells the MHI-2000 that this is a Setup command. These allow the network or application running at the host to change or read the MHI-2000’s parameters, as well as to control the execution of any resident C program running on the MHI-2000. Message Format - ?x or ?99y or ?9z Where: ? - The ASCII character that indicates a setup command.
Specific Control Commands
TABLE 5–3. Special Control Commands
?S
This command causes the MHI-2000 to enter the Setup Menu. In this menu, you can view and change any of the MHI-2000 parameters. For more information, see Chapter 4, “Startup & Operation”.
?D
This command causes the MHI-2000 to enter the Diagnostics Menu. In this menu, you can run a variety of useful diagnostic tests for alignment and troubleshooting requirements. For more information, see Chapter 4, “Startup & Operation” and Chapter 6, “Diagnostics”.
?R
This command causes all of the MHI-2000’s parameters to be set to default values. Care should be taken when using this command, because there are a few parameters that are used for hardware and communication requirements. Prior to the use of this command, you should have stored the keysheet parameters or upload all group strings to an ASCII file.
?THH:MM:SS,mm-dd-yy
This command is used to set the on-board real-time clock (RTC). If Starnode is connected, the RTC will be set to the Starnode time, and this command need not be used. The RTC is backed up by a battery, and it continues to keep time when the MHI-2000 power is Off. The command can be used over any serial port. All parameters must be entered as two-digit numbers, using leading zeros where necessary. HH = hours, 24-hour format (00 to 23) MM = minutes SS = seconds mm = month dd = day yy = year
Rev A, January 2002
MHI-2000 Technical Reference Manual
5-11
5 Host Commands & Downloads
These are basic commands to perform specific tasks. They follow the format ?x, where x is S, D, R, or THH:MM:SS,mm-dd-yy.
Page 64
Chapter
5
Host Commands & Downloads
Uploading Multiple Group Commands These are your basic group upload commands that will send information to whichever communication port requested the information. This may be useful for saving specific MHI-2000 parameters to a file, or just to review the MHI-2000 current settings. Appended to the end of this transmission is ~;~, used to perform a restart of the MHI-2000 if these groups were back downloaded. This may be useful when configuring multiple MHI-2000s or transferring one MHI-2000’s setup configuration to another. They follow the format ?99y, where y is 7, 8, or 9. TABLE 5–4. Multiple Group Commands
?997
This is similar to a setting of 9, with the exception of groups 45, 46, and 47, which are missing. In the MHI-2000, groups 45, 46, and 47 do not exist. This is the same as a setting of 9. Each group setup string is uploaded with a ~% prefix for later downloading use.
?998
This command causes the MHI-2000 to upload current endpoint table. This selection is not applicable with MHI-2000 devices.
~%890 +000 +000 +000 +000 +000 +000 +000 +000~ ~%891 +000 +000 +000 +000 +000 +000 +000 +000~ ~%892 +000 +000 +000 +000 +000 +000 +000 +000~ ~%893 +000 +000 +000 +000 +000 +000 +000 +000~ ~%894 +000 +000 +000 +000 +000 +000 +000 +000~ ~%895 -+000 +000 +000 +000 +000 +000 +000 +000~ ~%896 200 500~ ~;~ ?999
This command causes the MHI-2000 to upload all group setup strings. Each group setup string is uploaded with a ~% prefix for later downloading use. The first group is shown below. As you can see, each parameter is separated by a <space>. Refer to Chapter A, “Group Setup Strings” for a description of each group setup string.
~%800 0 0000 00 0500 00000 0000 0000~
5-12
MHI-2000 Technical Reference Manual
Rev A, January 2002
Page 65
Control Commands from the Host
User Program Control Commands If there is a user program installed in the MHI-2000, these commands may override the execution of that program. They follow the format ?9z, where z is 1, 2, 3, 4, or 5. TABLE 5–5. User Program Control Commands
?91
This command extracts or uploads a user C program from the MHI-2000. The program is sent as ASCII Motorola S-records, framed appropriately for the port that sent the command. For example, if a ~?91~ is sent to the MHI-2000 over the Host or Setup port, the S-records are framed with a tilde (~). This framing is necessary in case the S-records are saved to a .s2k file by a terminal emulation or other program, so that file can be downloaded to the MHI-2000 later. Similarly, Srecords sent to the Starnode or Ethernet port are framed in the .l2k file format. This feature is useful for extracting a user program from a MHI-2000 when the original .s2k or .l2k file is not available, for use in a replacement MHI-2000, or to save the program before a new version of the operating system is downloaded. It is important that the host program that is saving the S-records to a file does not drop any characters as the data is received. XON/XOFF protocol is supported by the MHI-2000 serial ports.
?92
This command causes the MHI-2000 to erase the C program currently stored in NOVRAM. This allows the program to be erased without affecting current parameter values or any data stored in NOVRAM. This does not remove the user program from Flash. You must store another user program to Flash. Example: If the default MESSAGE CHARACTER value is not changed, an Erase C Program command would be downloaded as:
~?92~ The MHI-2000 would then erase its C program from NOVRAM. The MHI-2000 must then be reset by downloading the RESET command:
~;~ ?93
This command stops the program running (it remains in NOVRAM). The program will start again following the next MHI-2000 reset.
?94
This command suspends the program.
?95
This command resumes the program.
Rev A, January 2002
MHI-2000 Technical Reference Manual
5-13
5 Host Commands & Downloads
Only the program's code and constant data segments are sent.
Page 66
Chapter
5
Host Commands & Downloads
ASCII % Command-Parameters When sent over STARNODE or TCP/IP, use this format %8pppvvv, %8xy, or %9xy. When sent serially and the default MESSAGE CHARACTER is ~, use this format ~%8pppvvv~, ~%8xy~, or ~%9xy ~. The ASCII % (percent sign; decimal 37; hexadecimal 25) command tells the MHI-2000 that this is a Parameter command. These allow the network or application running at the host to change or read the MHI-2000’s parameters. Message Format - %8pppvvv or %8xy or %9xy Where: % - The ASCII character that indicates a parameter command. Variable
Description xy
These two numbers refer to which group string is to be uploaded (%9xy), or downloaded (%8xy).
ppp
This is the individual parameter number to change.
vvv
This is the individual parameter value to change.
Individual Group String Commands These are basic commands used to perform both upload and download of individual group setup string. When downloading a string, you should follow this command with a ; command. This will cause the MHI-2000 to reboot with the new parameters applied. These commands follow the format: xy:
Is the specific group setup string. Refer to Appendix A, “Group Setup Strings” for more detail.
%9xy
Is the command to upload a specific group setup string.
%8xy
Is the command to download a specific group setup string. All individual parameters within the string should be separated by a <space>. Group strings may be truncated, if later parameters within that string do not have to be modified. If the string is accepted, you will get the following response: Group 8xy Loaded
Individual Parameter Command This is your basic command to change an individual parameter only. After downloading a string, you should send a ; command. This will cause the MHI-2000 to reboot with the new parameters applied. These commands follow the format:
5-14 ppp:
Is the specific parameter number.
vvv:
Is the specific parameter value.
%pppvvv
Is the command to change parameter ppp to a value of vvv.
MHI-2000 Technical Reference Manual
Rev A, January 2002
Page 67
Control Commands from the Host
ASCII A or Greater Command - User Program Data Any value greater than an ASCII A (decimal 65; hexadecimal 41) will be forwarded to the C program running the MHI-2000 for execution. Message Format - A<MESSAGE> Where: A (or any greater ASCII character) - Informs the operating system to pass this message to the C program running the MHI-2000. <MESSAGE> - Is the remainder of the string of up to 126 ASCII characters that will be passed to the C program. This will be stored in the buffer for the receiving port, and can be retrieved using a dta_get() call. Refer to the SH3 C Programmer’s Platform User Manual for more information.
Host Commands & Downloads
5
Rev A, January 2002
MHI-2000 Technical Reference Manual
5-15
Page 68
Chapter
5
Host Commands & Downloads
TOTAL Command When sent over STARNODE or TCP/IP, use this format /TOTAL. When sent serially, use this format ~TOTAL~. The TOTAL command is used to display a report such as: 0 boxes, 0 no reads 0 unassigned, 0 on multiple boxes, 0 no line on box Where: boxes - Total box count no-reads - No-read count The totals in the first line will not be cleared (even if the power is cycled Off and On) until TOT00 is sent.
5-16
MHI-2000 Technical Reference Manual
Rev A, January 2002