John:

As David mentioned, the NEXT command will do the trick. Also, the MTCH command is not reliable in LINE OFF mode; it matches the next chunk of data read into the buffer. Depending on how the data is sent by the application, this could be a partial buffer, e.g. "Current 34 Amps\r\nAlarm 182 Am". Only EXPT works across partial buffers in LINE OFF mode.


...
LINE ON
SEND "S\r\n"
EXPT "Universal Electric Corp"i else goto @NO_MATCH
NEXT
MTCH "(#+.#+)"ir else goto @NO_NUM_MATCH
STOR "Version" "${1}"

EXPT "Channel # Enabled"ir else goto @NO_MATCH
NEXT
MTCH "Current (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH1C" "${1}"
NEXT
MTCH "Alarm (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH1A" "${1}"
NEXT
MTCH "Full Scale (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH1FS" "${1}"

EXPT "Channel # Enabled"ir else goto @NO_MATCH
NEXT
MTCH "Current (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH2C" "${1}"
NEXT
MTCH "Alarm (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH2A" "${1}"

EXPT "Channel # Enabled"ir else goto @NO_MATCH
NEXT
MTCH "Current (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH3C" "${1}"
NEXT
MTCH "Alarm (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH3A" "${1}"

EXPT "Channel # Enabled"ir else goto @NO_MATCH
NEXT
MTCH "Current (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH4C" "${1}"
NEXT
MTCH "Alarm (#+).Amps"ir else goto @NO_NUM_MATCH
STOR "SL1CH4A" "${1}"
...

Regards,

Bill Fisher
Dartware, LLC


____________________________________________________________________
List archives: http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]

Reply via email to