Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

how to convert a Cstring to a ViBuf

$
0
0

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

Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>