Yokogawa PR300 Power and Energy Meter User Manual

Page 79

Advertising
background image

4-18

<Toc> <Ind>

<4. PC Link Communication Protocol>

IM 77C01E01-10E

‘=== Subroutine ===

*RECEIVECHR

‘Interruption processing during
receiving

interval off

‘Start timer

RCVCHR$=RCVCHR$+input$(lof(#1),#1)

‘Fetch character string

from receive buffer.

END$=mid$(RCVCHR$,len(RCVCHR$),1)

select case END$

case LF$

‘Echo-back-capable

RCVCHR$=””

‘Initialize receive character string

case CR$

‘Receiving end flag

STOPFLAG=1

‘Set receiving end flag

case else

end select

interval on

‘Start timer

return

*TIMEOUT

‘Timeout processing

STOPFLAG=1

‘Set timeout flag

RCVCHR$=”Time out ! (5 sec)”+CR$

‘Character string for display
on screen “Time out ! (5 sec)”

return

Advertising