Section 5
Page 5 - 56
HA243821
Issue 5 Mar 98
MODEL 346 INSTALLATION AND OPERATION MANUAL
5.7.8 C PROGRAM LISTING (Cont.)
/**************************************************************************
FUNCTION
:
POLL VALUE
DESCRIPTION
:
This routine polls (reads from) the 34X instrument
ARGUMENTS
:
port
= port offset
addr
= Pointer to instrument address (GID GID UID UID)
cmd
= Pointer to the command to be used
chan
= Pointer to channel character
reply
= Pointer to reply buffer
RETURNS
:
Should returnETX but also NUL, EOT, ACK, and NAK.
NOTES
:
**************************************************************************/
char poll_value( int port, char *addr, char *cmd, char *chan, char *reply )
{
send_address(port,addr);
send_byte(port,*chan);
while( *cmd != NUL )
send_byte( port, *cmd++ );
send_byte(port,ENQ);
return( get_reply(port,reply) );
}