LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

convert ViChar to double

I am using a hp34970a driver. I am making a voltage measurement. The reading comes back as a ViChar data type. How do I convert this to a double so I can do math with it?
0 Kudos
Message 1 of 14
(3,886 Views)

Hi Mike:

The ViChar data type is just like a regular char datatype.  VISA just puts a wrapper around it so it can be ported to different operating systems.  You can type cast this to a double just as you would for any char datatype.

ViChar mychar;
double mydouble;
mydouble = (double) mychar;

Regards,

Emilie S.

 

0 Kudos
Message 2 of 14
(3,877 Views)
Emilie,
 
 
Message 3 of 14
(3,854 Views)
Emilie,
 
 
0 Kudos
Message 4 of 14
(3,854 Views)
Emilie,
 
  
0 Kudos
Message 5 of 14
(3,854 Views)
Emilie,
 
   
0 Kudos
Message 6 of 14
(3,854 Views)
Emilie,
 
    
0 Kudos
Message 7 of 14
(3,854 Views)
Emilie,
 
     
0 Kudos
Message 8 of 14
(3,854 Views)
Emilie,
 
      
0 Kudos
Message 9 of 14
(3,854 Views)
Emilie,
 
       
0 Kudos
Message 10 of 14
(3,854 Views)