Showing results for 
Search instead for 
Did you mean: 

HP34401A output Data to float

Currently using HP34401A driver and use the example code to display the result of the reading.

Data Type declaration of the variables according to the sample
            ViReal64  reading;
            ViChar    msgStr[256];

checkErr( hp34401a_Read (hp34401a, 5000, &reading));
sprintf (msgStr, "%f", reading);

so for it to display on the panel, i created

SetCtrlVal(panel,PANEL_STRING, msgStr);

not it shows the reading on the Panel as a string(correct me if I am wrong),
because I want to do a calculation first on the reading like I want to display it on float, how can i convert it as such, something like
floatvariable = reading/somevalue;
SetCtrlVal(panel,PANEL_STRING, floatvariable);


edit: can someone  move this to Labwindows/CVI Area?

Message Edited by smoken on 04-01-2008 05:21 AM

Message Edited by smoken on 04-01-2008 05:23 AM
Electronics Manufacturing Tester Forum
0 Kudos
Message 1 of 2
This question has been answered on the LabWindows/CVI Forums: HP34401A problem .
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 2