E1330B()
NAME
E1330B − SCPI Commands Quick Reference
DESCRIPTION
The following is a SCPI command quick reference for the HP E1330B Digital I/O. This quick reference provides:
Command Descriptions
Commands Not Supported
Commands Changed
Query Command Response Types
Overlapping Commands
ONSRQ Changes
The SCPI commands are to be embedded in HP Compiled SCPI commands. For information on HP Compiled SCPI, see the HP Compiled SCPI commands in manual pages, or see the HP Compiled SCPI learning products.
For additional information on SCPI commands, see the VXI User’s Guide for the instrument.
COMMAND DESCRIPTIONS
Common Commands
*IDN? Returns the identification string of the instrument.
*RST Resets the instrument to a known state.
*TST? Self-Test, returns 0 if passes.
*OPC Sets the request for OPC flag when all pending operations have completed.
*OPC? Query operation complete. Returns 1 when all pending operations have completed.
*WAI Wait for complete.
*CLS Clears all status registers.
*ESE Enable status register bits.
*ESE? Query event status enable.
*ESR? Query and clear the event status register.
*SRE Sets the service request enable register bits and corresponding serial poll status register bits to generate a service request.
*SRE? Query service request enable.
*STB? Query read status byte.
*RCL Recall instrument state.
*SAV Store instrument state.
SCPI Commands
For the digital I/O SCPI commands the following applies:
[:type] n (port) m (bit) BYTE0,1,2,30-7 WORD 0,2 0-15 LWORD 0 0-31
MEASure:DIGital:DATAn[:type][:VALue]?
Reads selected 8-, 16-, or 32-bit port n after completion of handshake. Assumes decimal format of input data.
MEASure:DIGital:DATAn[:type]:BITm?
Reads selected bit on selected 8-, 16-, or 32-bit port n after completion of handshake. m represents what bit you want to read.
MEASure:DIGital:DATAn[:type]:TRACe <name>
Reads selected 8-, 16-, or 32-bit port n after completion of handshake and stores block. <name> is previously defined, limited to 13 characters.
MEASure:DIGital:FLAGn?
Reads FLAG line on selected port n. Returns 0 or 1 to show if READY or BUSY. Used to implement custom handshakes.
MEMory:VME:ADDRess <address>
Sets the address for additional VME system memory. <address> can be 0-FFFFFFF8, MIN, or MAX.
MEMory:VME:ADDRess? [MIN or MAX]
Returns the current add-on VME memory address. The optional parameter lets you query for the fixed MIN or MAX address.
MEMory:VME:SIZE [<base>]<size>
Sets the size of the add-on VME memory to be used for the digital I/O card. <base> can be nothing or #H, and <size> can be 0-#hC00000 or MIN or MAX.
MEMory:VME:SIZE? [MIN or MAX]
Returns the current size of the add-on VME memory assigned to the digital I/O module. The optional parameter lets you query for the fixed MIN or MAX address.
MEMory:VME:STATe <state>
Sets the state ON (1) or OFF (0) of the assigned VME memory. When this is OFF, all memory commands refer to the base system memory.
MEMory:VME:STATe?
Returns the current state of the add-on VME memory. Returns 1 (ON) or 0 (OFF).
[SOURce:]DIGital:TRACe:CATalog?
Lists the currently defined memory blocks.
[SOURce:]DIGital:TRACe[:DATA] <name>,<block_data>
Writes a block of data to a previously defined memory block. <name> is the name of the memory location (13 characters max), and <block_data> is the data to send. See the HP E1330B Digital I/O Manual.
[SOURce:]DIGital:TRACe[:DATA]? <name>
Reads a block of data from a previously defined memory block. <name> is the name of the memory location (13 characters max).
[SOURce:]DIGital:TRACe:DEFine <name>,<size>,<fill>
Defines a memory block and fills it with the value specified by fill. <name> is the name of the memory location (13 characters max). <size> up to 4Gbytes (depends on memory installed). <fill> is 0-255, default is 0.
[SOURce:]DIGital:TRACe:DEFine? <name>
Returns the size in bytes of a previously defined block of data. <name> is the name of the memory location (13 characters max).
[SOURce]:DIGital:TRACe:DELete <name>
Deletes the specified memory block. <name> is the name of the memory location (13 characters max).
[SOURce]:DIGital:TRACe:DELete:ALL
Deletes all memory blocks.
[SOURce]:DIGital:CONTroln:POLarity <polarity>
Sets voltage level for logical true for port n to either TTL high for POS or low for NEG.
[SOURce]:DIGital:CONTroln:POLarity?
Returns the polarity for port n. Returns POS or NEG.
[SOURce:]DIGital:CONTroln[:VALue] <value>
Sets or clears control line on selected port n. Command used to create custom handshakes when HANDshake is set to NONE. <value> can be 0, OFF, 1, or ON.
[SOURce:]DIGital:DATAn:[:type][:VALue] <value>
Writes data to selected port n when port is ready to start a new handshake. Data can be binary, octal, decimal, or hexadecimal.
[SOURce:]DIGital:DATAn[:type]:BITm <value>
Sets or clears selected bit on selected port, n, when port is ready to start a new handshake. m represents what bit, and <value> is 0 or 1.
[SOURce:]DIGital:DATAn[:type]:TRACe <name>
Writes the named block of data to the specified port, n, whenever the port is in ready state to start a new handshake.
[SOURce:]DIGital:DATAn[:type]HANDshake:DELay <time>
Sets delay between data output and assertion of control line for data output. Also sets strobe pulse width for both output and input STROBE handshake.
[SOURce:]DIGital:DATAn[:type]HANDshake:DELay?
Returns handshake delay time for selected port n.
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE] <mode>
Selects type of handshake to transfer data between the selected port n and peripheral. All handshakes are initiated by execution of a DIG:DATAn[:type], DIG:DATAn[:type]:BITm, DIG:DATAn[:type]:TRACE, MEAS:DATAn[:type], MEAS:DATAn[:type]:BITm,or MEAS:DATAn[:type]:TRACE command. <mode> can be NONe, LEADing, TRAiling, PULSe, PARTial, or STRobe.
[SOURce:]DIGital:DATAn[:type]:HANDshake[:MODE]?
Returns NONE, LEAD, TRA, PULS, PART, or STR to show handshake type for the selected port n.
[SOURce:]DIGital:DATAn[:type]:POLarity <polarity>
Sets voltage level of data for logical true for port n to either POS for TTL high or NEG for TTL low.
[SOURce:]DIGital:DATAn[:type]:POLarity?
Returns the polarity of port n. Returns POS or NEG.
[SOURce]:DIGital:FLAGn:POLarity <polarity>
Sets voltage level for flag line for logical true for port n to either POS for TTL high or NEG for TTL low.
[SOURce]:DIGital:FLAGn:POLarity?
Returns the polarity for port n. Returns POS or NEG.
[SOURce]:DIGital:HANDshaken:DELay <time>
Sets delay time between data output and assertion of control line for data output on port n for BYTE transfer only. Also sets strobe pulse for both output and input STROBE handshake. <time> can be 2us to 15us, 20us to 150us, 200us to 1.5ms, 2ms to 15ms.
[SOURce]:DIGital:HANDshaken:DELay?
Returns handshake delay time for port n.
[SOURce]:DIGital:HANDshaken[:MODE] <mode>
Selects type of handshake to transfer data between selected port n and peripheral. For BYTE transfers only. All handshakes are initiated by execution of DIG:DATAn[:type], DIG:DATAn [:type]:BITm, DIG:DATAn[:type]:TRACE, MEAS:DATAn[:type], MEAS:DATAn[:type]:BITm, or MEAS:DATAn[:type]:TRACE command. <mode> can be NONe, LEADing, TRAiling, PULSe, PARTial, or STRobe.
[SOURce]:DIGital:HANDshaken[:MODE]?
Returns handshake mode. Returns NONE, LEAD, TRA, PULS, PART, or STR for port n. For byte transfer only.
SYStem:ERRor?
Returns the contents of the system error register
SYStem:VERSion?
Returns the SCPI version which this instrument complies to.
COMMANDS NOT SUPPORTED
C-SCPI does not support the commands listed. However, these commands are still supported in the Command Module version.
Macro commands not supported: MEM:DEL:MACR, *DMC, *RMC, *GMC, *PMC, *LMC, and *EMC
Monitor commands not supported: DISP:MON:STAT, DISP:MON:CHAN, DISP:MOM:PORT, and DISP:MON:STR?
COMMANDS CHANGED
The following commands are different between C-SCPI and Command Module version:
MEM:VME:ADDR, MEM:VME:ADDR?
MIN = 0 (was 2,097,152) and MAX = 4,294,967,288 (was 14,680,156)
MEM:VME:ADDR <address>
In the Command Module version, the address is an absolute address in VME A24 memory. The memory can be either in the E1405/E1406 A24 shared memory or on an external VME A24 memory card.
In the C-SCPI version the address is derived in one of the following methods:
Method 1:
The address is a C pointer to memory provided by the operating system of the computer. For instance, the name of an array or the pointer returned as a result of a malloc() function call will provide an appropriate address.
address = (char *)malloc(buf_size); MEM:VME:ADDR address;
Method 2:
The address of the memory points to memory that resides on a VXI device that has shared A24 memory.
id = iopen("vxi, ladd");
address = imap(id,I_MAP_EXTEND,,0,20,SICL_NULL);
MEM:VME:ADDR address;
Method 3:
The address of the memory is an absolute A24 address and points to memory that resides on a VME memory device.
id = iopen ("vxi");
address = imap(id,I_MAP_A24,pagestart,pagecnt,SICL_NULL);
MEM:VME:ADDR address;
NOTE: For C-SCPI the memory must be capable of D32 transfers to avoid bus errors since the memcpy() function used by the instrument driver uses 32 bit transfers.
QUERY COMMAND RESPONSE TYPES
All but the following queries will return an integer.
SYST:ERR? int, quoted string
SYST:VERS? string
DIG:DATAn:type:POL? string
DIG:DATAn:type:HAND? string
DIG:DATAn:type:HAND:DEL?
float
DIG:CONTn:POL? string
DIG:FLAGn:POL? string
DIG:HANDn? string
DIG:HAND:DEL? float
DIG:TRACE:CAT? string
DIG:TRACE:DATA? string
*IDN? string
OVERLAPPING COMMANDS
The following commands continue execution by interrupt service routines after the command execution routine returns to the user program when cscpi_overlap is enabled.
SOURCE:DIGITAL:DATAn:type:VALUE (NOTE 1)
SOURCE:DIGITAL:DATAn:type:BITm (NOTE 1)
SOURCE:DIGITAL:DATAn:type:TRACE (NOTE 1)
MEASURE:DIGITAL:DATAn:type:TRACE (NOTE 1)
NOTE 1:
These commands are not overlapped if handshake mode is set to NONE since interrupts are not used for that case.
Commands may be sent to other instruments while the Digital I/O driver is finishing the overlapping commands. The *OPC?, *WAI or *OPC commands may be used to determine when the overlapping command has totally finished.
ONSRQ RESTRICTIONS
In general, an interrupt service routine shouldn’t send commands to an instrument that is also being used in the main program (foreground). This is due in part to the fact that the command in the ISR may change the state of the card during the execution of the main program command. Also, the main program might be executing a command that "locks" the card via an os_card_request so that the interrupt service routine cannot get access to the card and will wait forever for the card to become "free".
The following commands wait on an ISR and therefore cannot be used in an interrupt service routine whether overlap is on or off.
MEASURE:DIGITAL:DATAn:type:VALUE
MEASURE:DIGITAL:DATAn:type:BITm
NOTE: These commands do NOT interrupt if the handshake mode is set to NONE. If handshake mode is NONE, then these commands can be used in an interrupt service routine.
The following commands wait on an ISR and therefore cannot be used in an interrupt service routine when overlap is off.
SOURCE:DIGITAL:DATAn:type:VALUE
SOURCE:DIGITAL:DATAn:type:BITm
SOURCE:DIGITAL:DATAn:type:TRACE
MEASURE:DIGITAL:DATAn:type:TRACE
NOTE: These commands do NOT interrupt if the handshake mode is set to NONE. If handshake mode is NONE, then these commands can be used in an interrupt service routine.
— December 11, 1992