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 25

MHI-2000 Technical Reference Manual: CHAPTER 5 Host Commands & Downloads, pages 53 to 60

Pages 53 to 60 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 53

5 Host Commands & Downloads

CHAPTER 5

This chapter describes how to use a Starnode network, Ethernet network, and the serial ports to connect the MHI-2000 to a host computer to communicate with, control, and download C programs.

Introduction

•

How to control the MHI-2000 or solicit information from it using commands downloaded from a host computer or Starnode controller.

•

How to change parameters using commands from a host computer.

•

How to develop C programs for a MHI-2000 and download them to it.

Before beginning Starnode operations, you should know the network protocols and messages.

Control Commands from the Host When sending commands to the MHI-2000 through a: •

Host or Terminal/Setup port, a framing character, normally a tilde (~), must be sent before and after each command.

•

Starnode or Ethernet port, a forward slash (/) must precede each command. Otherwise, all strings that begin with an ASCII A or greater will be interpreted as data and will be sent to the user program.

In Starnode environments, command values are passed via the SSEND, SBRDC, or SBRDT operations. A description of each command is described in Table 5–1. The commands are listed numerically, by decimal value, in ascending order. Commands with a decimal value less than 65 are processed at the operating system level. Commands with a decimal value of 65 or greater are interpreted as data to be passed to a user C program running on the MHI-2000.

Rev A, January 2002

MHI-2000 Technical Reference Manual

5-1

5 Host Commands & Downloads

You can connect the MHI-2000 to a host PC by a Starnode network via the STARNODE port, Ethernet network via 10 base T port, or through a serial port. Once communication with the host or network has been established, you can command the MHI-2000 to perform many functions and to provide requested information. The commands can be sent to the Setup port, but are most commonly sent to the Host, Ethernet or Starnode port. This chapter will describe in detail:

Page 54

Chapter

5

Host Commands & Downloads

TABLE 5–1. Terminal Control Commands

Command

5-2

Message Type

(Dec/Hex)

(Serial)

(Network)

Request Diagnostic String

52/34

~4~

4

Request Status Information

53/35

~5~

5

Reset

59/3B

~;~

;

Clear Diagnostic Count

60/3C

~<~

<

Enable Digital Output

61/3D

~=x~

=x

Turn Relay Off

62/3E

~>x~

>x

Setup Command

63/3F

~?x~

?x

Upload Parameter

37/25

~%x~

%x

Program Message

65/41 (or greater)

A (or greater)

A (or greater)

Display Box/No Read Count

~TOTAL~

/TOTAL

Outzone Deviation Statistics

~TOLER~

/TOLER

Start Presence

~!~

/!

Stop Presence

~$~

/$

Clear Box/No Read Registers

~TOT00~

/TOT00

MHI-2000 Technical Reference Manual

Rev A, January 2002

Page 55

Control Commands from the Host

ASCII 4 Command - Requesting a Diagnostic String When sent over STARNODE or TCP/IP, use this format 4. When sent serially and the default MESSAGE CHARACTER is ~, use this format ~4~. Upon receiving an ASCII 4 command (decimal 52; hexadecimal 34), the MHI-2000 will send the following string back to the controller: MHI #NNNNN Where: NNNNN is the message count for this MHI-2000. This value will be between 00000 and 65535. This string can be used for diagnostic purposes. The message count is incremented each time this message is requested. The count is reset to zero when the unit receives an ASCII < command (decimal 60; hexadecimal 3C), an ASCII ; command (decimal 59; hexadecimal 3B); or when the MHI-2000 is rebooted by turning it Off and then On again. Message Format - None

Host Commands & Downloads

5

Rev A, January 2002

MHI-2000 Technical Reference Manual

5-3

Page 56

Chapter

5

Host Commands & Downloads

ASCII 5 Command - Requesting Status Information When sent over STARNODE or TCP/IP, use this format 5. When sent serially and the default MESSAGE CHARACTER is ~, use this format ~5~. When the MHI-2000 receives an ASCII 5 command (decimal 53; hexadecimal 35), it responds by sending a string representing its current status. The information returned can be useful for troubleshooting malfunctions. The returned string has the format: MHI VV ABCDEFGHIJKLMNOPQRSTUV Where: VV - The version number of the software used in the MHI-2000 ABCDEFGHIJKLMNOPQRSTUV - The 22-character diagnostic string The diagnostic status string reflects the current status of the MHI-2000, as shown in Table 5–2. TABLE 5–2. Status String Interpretation

5-4

Position

Meaning When 1

A

Inzone Status

B

Outzone Status

C

Zone Error Status

D

Decode Status

E

BTL Status

F

Scan Speed Status

G

Transmit Data Status

H

NAK Status

I

Receive Data Status

J

Receive Error Status

K

NO READ Status

L

MATCH Status

M

NO MATCH Status

N

Setup Status

O

Program Status

P

Default Status

Q

Fault Status

R

Conveyor Stalled Status

S

Reverse Tach Status

T

Ethernet Fail Status

U

Starnode Fail Status

V

Slave Offline Status

MHI-2000 Technical Reference Manual

Rev A, January 2002

Page 57

Control Commands from the Host

Status String Digit Explanations A - Inzone Status 1 indicates that the presence photoeye or Microswitch™ has detected an object entering the scanning zone. B - Outzone Status 1 indicates that the outzone presence photoeye or Microswitch has been triggered. This indicates that the box or object is leaving the scanning zone. C - Zone Error Status 1 indicates that a zone synchronization error has occurred. When not using gap tracking, this error occurs when either the inzone presence detecting device signals a second time before the outzone detector has signaled once, or the outzone device signals prior to an inzone signal. D - Decode Status 1 indicates that the decoder is processing data.

1 indicates that the MHI-2000 is falling behind in analyzing data stored in the bar timing logic (BTL) buffer. This digit may be 1 if large amounts of barcoded data are being scanned. F - Scan Speed Status 1 indicates that the scanning mirror is not running within the normal operating range. G - Transmit Data Status 1 indicates that data is currently being sent through the Host, Terminal, or Starnode Ports. H - NAK Status 1 indicates that the MHI-2000 does not perceive the Starnode network as operational, i.e., the network has not polled the MHI-2000 recently. It may also indicate an error in data received from the Starnode Controller. I - Receive Data Status 1 indicates that the MHI-2000 is currently receiving data through the Host, Setup, or Starnode Ports. J - Receive Error Status 1 indicates that received data contained a parity or framing error. K - NO READ Status 1 indicates a NO READ output energized. L - MATCH Status 1 indicates a MATCH output energized.

Rev A, January 2002

MHI-2000 Technical Reference Manual

5-5

Host Commands & Downloads

5

E - BTL Status

Page 58

Chapter

5

Host Commands & Downloads

M - NO MATCH Status 1 indicates a NO MATCH output energized. N - Setup Status 1 indicates that the unit is operating in the Diagnostics mode or the Setup mode. Refer to “Setup & Diagnostic Modes” on page 4-4 for more information. O - Program Status 1 indicates that the MHI-2000 is currently executing a user program. P - Default Status 1 indicates that the MHI-2000 is in the Default Setup mode. Q - Fault Status 1 indicates that there is a hardware error fault somewhere in the system (FAULT LED). R - Conveyor Stalled Status 1 indicates that the conveyor has stalled. S - Reverse Tach Status 1 indicates that reverse conveyor movement has been detected. T - Ethernet Fail Status 1 indicates that the MHI-2000’s network connections are set up and the Ethernet link(s) are broken. Note: The entire network must be disabled if the link on just a single controller is broken. U - Starnode Fail Status 1 indicates that the MHI-2000 is configured for Starnode but there is no Starnode communication with Starnode Controller. V - Slave Offline Status 1 indicates that the slave device is offline.

Example If the default MESSAGE CHARACTER value is not changed, downloading the string ~5~ over the Host or Setup ports will cause the MHI-2000 to return a diagnostic string.

5-6

MHI-2000 Technical Reference Manual

Rev A, January 2002

Page 59

Control Commands from the Host

ASCII ; Command - Rebooting MHI-2000 When sent over STARNODE or TCP/IP, use this format ;. When sent serially and the default MESSAGE CHARACTER is ~, use this format ~;~. Upon receiving an ASCII ; (semicolon) command (decimal 59; hexadecimal 3B), the MHI-2000 will reboot as if it had been turned Off and then On again. The MHI-2000’s parameter values will be safely stored in memory after startup. Message Format - None

Host Commands & Downloads

5

Rev A, January 2002

MHI-2000 Technical Reference Manual

5-7

Page 60

Chapter

5

Host Commands & Downloads

ASCII < Command - Clearing Diagnostic Count When sent over STARNODE or TCP/IP, use this format <. When sent serially and the default MESSAGE CHARACTER is ~, use this format ~<~. The ASCII < (less than sign) command (decimal 60; hexadecimal 3C) is used to clear the message count from a MHI-2000 without having to restart it. Refer to “ASCII 4 Command - Requesting a Diagnostic String” on page 5-3 for details regarding the message count. This count may also be reset by sending an ASCII ; command that resets the MHI-2000 to its default values. Message Format - None

5-8

MHI-2000 Technical Reference Manual

Rev A, January 2002