LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output a boolean bit on gpib using VISA

The program that is being developed is to test a California Instruments power supply model 801RP.
 
The problem  is with the function that switches the output of the power supply on and off, the command is "outp <boolean>".
 
The question I am raising, how can I send this command with a visa transfer over a gpib interface?
0 Kudos
Message 1 of 5
(2,680 Views)

Hi Alex,

How does the instrument maunal define <boolean>?

Usually its "outp 0 | 1 | OFF | ON"

If it responses to 0 or 1 then you can convert your boolean to numeric 0 for False and 1 for True.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 5
(2,672 Views)

Ray

The Boolean is a '1' for on or a '0' for off.

Using a normal "visa write" which is a alpha numeric transfer I have been unable to find a way to just transfer the boolean. The equipment responds with a command failure.

I have tried transfer as a binary pattern in the high level of visa transfers but labview returns a not allowed in this session.

Thanks for your reply

Alec

0 Kudos
Message 3 of 5
(2,666 Views)
Why would you try to output just the Boolean when the command is "outp ". Why don't you try writing "outp 1" or "outp 0"? If you have an electonic copy of the programming manual or can provide a link to one, it would help if the above commands do not work.

Message Edited by Dennis Knutson on 06-20-2006 09:10 PM

0 Kudos
Message 4 of 5
(2,659 Views)

Hi,

Its as Dennis says,

Just send the string "outp 0" to set the output off and "outp 1" to set the output on.

If you have a boolean control, wire this to the boolean to numeric converter then use one of the string functions to concat or format the string with "outp ".

In fact there is a string function that provides a string output based on a boolean input.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 5 of 5
(2,648 Views)