User`s manual

Using the Agilent E1330B Digital I/O Module 39
Chapter 3
Trace Memory Example 2 This example writes 20 bytes as 10 WORDS at ports 0 and 1 as in the first
example, it uses an external VME memory board.
10 RE-SAVE "Trace_2"
20 ASSIGN @ Dio TO 70918
30 INTEGER A(1:10) ,Ready
40 DATA 65,66,67,68,69,70,71,72,73,74
!A, B, C, D, E, F, G, H, I, J.
50 READ A(*)
60 OUTPUT @Dio;"*RST;*OPC?"
70 ENTER @Dio;Ready
!Wait for completion.
80 OUTPUT @Dio;"MEM:VME:ADDR #H200000"
!Define memory location.
90 OUTPUT @Dio;"MEM:VME:SIZE 100"
!Reserve 100 bytes.
100 OUTPUT @Dio;"MEM:VME:STAT ON"
!Enable memory.
110 OUTPUT@Dio;"SOUR:DIG:TRAC:DEF alpha,100;*OPC?"
!Define memory name alpha.
120 ENTER @Dio;Ready
!Wait for completion.
130
OUTPUT @Dio USING"K,10(W)";"SOUR:DIG:TRAC alpha,#220";A(*)
!Fill memory alpha with 20
bytes.
140 OUTPUT@Dio;"SOUR:DIG:DATA0:WORD:TRAC alpha;*OPC?"
!Output the 20 bytes.
150 ENTER @Dio;Ready
!Wait for completion.
160 OUTPUT@DIO;"SOUR:DIG:TRAC:DEL alpha,*OPC?"
!Delete memory alpha.
170 ENTER @Dio;Ready
!Wait for completion.
180 END
Trace Memory Example 3 This example reads 40 WORDS from ports 0 and 1.
10 RE-SAVE "Trace_3"
20 ASSIGN @ Dio TO 70918
30 DIM Head$[4]
40 INTEGER A(1:20) ,Ready
50 OUTPUT @Dio;"*RST;*OPC?"
60 ENTER @Dio;Ready
!Wait for completion.
70 OUTPUT@Dio;"SOUR:DIG:TRAC:DEF alpha,80;*OPC?"
!Define memory name alpha.
80 ENTER @Dio;Ready
!Wait for completion.
90 OUTPUT@Dio;"MEAS:DIG:DATA0:WORD:TRAC alpha;*OPC?"
!Output 80 bytes.
100 ENTER @Dio;Ready
!Wait for completion.
110 OUTPUT @Dio;"SOUR:DIG:TRAC:DATA? alpha"
!Request the data.
120 ENTER @Dio USING "4A,40(W)";Head$;A(*)
130 OUTPUT @Dio;"SOUR:DIG:TRAC:DEL alpha;*OPC?"
!Remove memory block.
140 ENTER@Dio;Ready
!Wait for completion.
150 END