Chapter 4
Programming in S Mode
4-2
www.ni.com
Programming Considerations
•
The programming examples for each function description are in
Microsoft QuickBASIC Version 4.5. Although the examples in this
manual are written in BASIC, you can program the
GPIB-232/485CT-A using any programming language that has access
to a serial port.
•
In the function syntax descriptions, arguments enclosed in square
brackets (
[]
) are optional. Do not enter the brackets as part of your
argument.
•
For all programming examples, the communications port has been
assigned to file number 1 (
#1
) by the BASIC
OPEN "COM..."
statement.
•
The I/O and high-level bus management functions are the most
frequently used and should meet most of your needs. In the
descriptions that follow, these functions are marked with an asterisk
(*).
•
You can use function name abbreviations, which include only as many
characters as necessary to distinguish them from other functions. The
abbreviated forms are indicated by bold text in the syntax description
of each function.
Programming Messages
You can program the GPIB-232/485CT-A by sending programming
messages (ASCII strings) and data strings to its serial port.
Programming Message Format
Each programming message is terminated with a carriage return (<CR>), a
linefeed (<LF>), or a carriage return followed by a linefeed (<CR><LF>).
Message termination is indicated by a <CR> in the syntax portions of the
function descriptions. In the programming examples, the BASIC
PRINT #
statement automatically sends a carriage return at the end of the string,
so a carriage return is not needed as part of the code.
You can enter programming messages in any combination of uppercase and
lowercase letters.