Running HP 4145A/B Program Directly on HP 4155A/4156A
Considerations about Dierences
Terminator
If you run your program on an external controller, use
<
CR
>
+
<
LF
>
as
the command terminator if you execute serial polling to read a status of HP
4155A/4156A in your program.
If you use only
<
CR
>
or
<
LF
>
as command terminator, HP 4155A/4156A
may respond with incorrect status.
This is due to the dierences of reading and parsing commands between HP
4145A/B and HP 4155A/4156A.
The following example and explanation gives a better understanding of this
.
10 OUTPUT @Hp415x;"ME1"
20 REPEAT
30 Status=SPOLL(@Hp415x)
40 UNTIL BIT(Status,0)
line number Description
10 triggers measurement and clears the data ready bit (bit1) of status register
.
20 to 40 waits until the data ready bit of status register is set to 1.
When the Terminator is only
<
CR
>
HP 4145A/B
At line 10:
1. HP 4145A/B starts reading data with RFD line set to false (data bus is
halted) after each byte.
In this example:
M
)
bus halted
)
E
)
bus halted
)
1
)
bus halted
2. After receiving
1
, HP 4145A/B recognizes valid command
ME1
, then
executes
ME1
.
At this time, the program is paused because the controller is trying to
send
<
CR
>
, which is a terminator, but HP 4145A/B has halted data
bus and does not receive
<
CR
>
.
5-5