Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert a Cstring to a ViBuf

hello,

 

I'm trying to control an attenuator with visual studio 2010 in C++ whith VISA library and i want to permit the utilisator to choose  the level of attenuation.

to realize this  i need to send to the attenuator a specific command which is " A050," if i want the attenuation is 50 dB.

 

So i create this CString:


 
CString attenutation=( Cstring ) "A0" + value + (Cstring) "," ;

where value is a Cstring wich depend on utilisator's attenuation choice.
 
to send this command i must use viWrite() wich requires a ViBuf in entry,  so i need to convert the Cstring attenuation in ViBuf .
 
help me please and excuse my English !
 
*Pardon my french
0 Kudos
Message 1 of 2
(4,453 Views)
0 Kudos
Message 2 of 2
(4,447 Views)