ICS ELECTRONICS 4863 Manual page 98

Table of Contents

Advertisement

3.8
PROGRAMMING GUIDELINES
This section shows the user how to program the 4863/2363 to transfer data,
to configure the unit, how to use the IEEE-488.2 Status Reporting Structure
to generate SRQs, binary data transfer, programming the IDN message and
saving the configuration. For additional examples, check the Application
Notes page at http:\\www.icselect.com.
3.8.1
Simple Port and Bit Commands
The Digital I/O lines can be programmed or read without configuring the
unit. The SOURce:DATA:PORTn command writes directly to any byte.
The ROUTe commands set or clear a specific output bit.
SENSe:DATA:PORTn? query reads from any byte and SENSe:BIT? reads
a specific bit. These commands automatically set the port as an input or as
an output. The SENSe and SOURce branches have a :POLarity command
that sets each bit's logically true state.
The following commands set bits on the Digital I/O connector:
SOURCe:DATA:PORT1 5
SOURCe:DATA:PORT2:POL #h00
SOURCe:DATA:PORT2 0
SOURCe:DATA:PORT2 #h13
SOURCe:DATA:PORT2?
ROUTe:CLOSe 2,1
ROUTe:OPEN 2,5
The following commands read data from the Digital I/O connector. The
input lines will be high unless connected to some device.
SENSe:DATA:PORT3
SENSe:BIT? 3,0
To read contact closures to ground at byte 3, set the polarity to low true.
SENSe:DATA:PORT3:POL 0
'sets CH1 and CH3 on
using the default polarity
'sets byte 2 to low true
polarity
'sets all byte 2 lines false
(high)
'sets CH 9, 10 and 13
true (low) (bits 0,1and 4)
'reads last output value
'sets bit 2 on byte 2 true
'sets bit 6 on byte 2 false
'reads state of byte 3 lines
'reads bit 1 on byte 3
'sets byte 3 polarity
for low true
3-31
The
3

Advertisement

Table of Contents
loading

This manual is also suitable for:

2363

Table of Contents