03-15-2007 03:52 PM
Hi, I've just been reading the example programs for S mode in the GPIB-232/485CT-A user manual) and even though I have read it several times I am still at a loss. I'm not convinced my GPIB-232/485CT-A box is working properly because even though I've had ID info back from the box I still cannot get my GPIB receiver to tune. Didn't think it was going to be this hard. ![]()
In the example 1 below - how on earth do we know that the program device is 11 (as per the comment)? And how is line 1 programming the device at address 11 to listen? ... as the number 11 is not mentioned anywhere .
Also, I understand that @ symbol equates to 64 decimal but what is the significance of the plus sign before the @ ? The manual gives this example but seems to assume knowledge that I, clearly, don't have.
(cut and pasted from the
Example 1
PRINT #1,"CMD"+CHR$(10)+"+@"
'Program device at address 11 to listen
'and GPIB-232/485CT-A at address 0 to
'talk. Terminate the programming message
'with <LF> (ASCII 10). The device listen
'address is 43 (ASCII +) and GPIB-'232/
485CT-A talk address is 64 (ASCII @).
'The <CR> sent automatically at the end
'of the PRINT# statement is used to
'terminate the command string.
PRINT #1,"WRT"+CHR$(10)+"ABCDE"
'Write the string "ABCDE" to the device at
'address 11.
Example 2
PRINT #1,"cmd #4"+CHR$(10)+"_?W"+CHR$(9)
'Pass control to device at GPIB address
'23. CHR$(9)=TCT command.
.
03-16-2007 03:52 PM
03-19-2007 04:33 AM
03-22-2007 04:25 PM
Specifically:
The GPIB address has to be programmed into the instrument directly, either through DIP switches or via a front panel. Otherwise, the GPIB controller has no way of talking to it.
The "+" sign is simply a concatinator - jam the things on either side together.