Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB user manual examples

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. Smiley Sad

 

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 .Smiley Mad  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

GPIB-232/485CT
-A user manual)

 

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.

.

0 Kudos
Message 1 of 4
(3,578 Views)
You probably can check the address (11 in the example) somewhere on the frontpanel of your instrument.
You have two complications, the serial interface needs a way to receive messages from you and send them to the tuner via another (GPIB) protocol.
And after that getting info back to you if you want to read something.

If you have a pc with a real gpib card and labview, try MAX directly and testing becomes much easier.
After that works you can decide to try again with the rs232 - gpib coupling.

greetings from the Netherlands
0 Kudos
Message 2 of 4
(3,550 Views)
Hi
 
As Albert wrote in the last post I would recommend using the Measurement and Automation Explorer (MAX) to test whether your device is working correctly. MAX is a low level configuration tool that helps you configure and test your devices before using them with LabVIEW. If your device shows up in MAX and works correctly then there is no reason as to why your device will not work correctly via LabVIEW.
 
Setup a PC with LabVIEW and MAX and the related drivers and give the example a go.
 
Kindest Regards
 
YatinM
NIUK & Ireland
Applications Engineer
0 Kudos
Message 3 of 4
(3,523 Views)

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.

0 Kudos
Message 4 of 4
(3,486 Views)