LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

example of program

good morning.
 
Does anybody have an exemple of programme using the librairy visa.h . It is only to help to know how to use simply the function of the librairy.
I have to communicate with a ANRITSU spectrum analyser via RJ45. For example, if I want to change the frequency, the document provided by ANRITSU tells me to send  " [:SENSE]:FREQUENCY:START 1MHZ " . But i don't know if I write directly this command on C++, or if I have to save it into a buffer with " sprintf(buffer,"[:SENSE]:FREQUENCY:START 1MHZ ") and use the function of the visa32.lib : viWrite(.buffer....).
 
Do you have an idea
 
thank you very much
0 Kudos
Message 1 of 4
(2,841 Views)


@seignseifer wrote:
...But i don't know if I write directly this command on C++, or if I have to save it into a buffer with " sprintf(buffer,"[:SENSE]:FREQUENCY:START 1MHZ ") and use the function of the visa32.lib : viWrite(.buffer....).


This does not sound like a LabVIEW question. Maybe you should try posting elsewhere, e.g.: http://forums.ni.com/ni/board?board.id=180

 

0 Kudos
Message 2 of 4
(2,831 Views)

You are posting in the LabVIEW forum again.

I happen to know that the installation of VISA includes examples for the different programming languages. Have you looked at them?

You have to use the VISA functions but you don't have to write it to a buffer first. ViWrite(ViSession vi, "SEN:FREQ:START 1 MHZ", byte count, return count) will work.

 

0 Kudos
Message 3 of 4
(2,830 Views)
I'm really sorry Smiley Sad. Thank you a lot
0 Kudos
Message 4 of 4
(2,824 Views)