LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read voltage of device that has no driver in LabVIEW?

Solved!
Go to solution

@Great-Britton wrote:

Hey,

 

I think it would be a lot easier to go with Yamaeda's suggestion and use Call Library Function nodes to call into the device driver DLL and use their functions instead of doing raw VISA commands yourself.

 

It would probably be easiest to create a library of VIs that wrap the calls you want to make, and then just use those VIs in your code.


Yes it would but she said she's new to the LabVIEW world.  Learning some basic VISA communications is probably a good way to get started.  Plus, depending on how the DLLs are written creating an interface might be tricky (even with a guru like Rolf helping out).

LabVIEW 8.5.1 - 2018 Pro Dev
0 Kudos
Message 11 of 14
(654 Views)

@Great-Britton wrote:

Hey,

 

I think it would be a lot easier to go with Yamaeda's suggestion and use Call Library Function nodes to call into the device driver DLL and use their functions instead of doing raw VISA commands yourself.

 


No, it is definitely not easier to integrate a DLL into LabVIEW than writing a few strings through VISA Write to an instrument and reading the response with VISA Read. The only reason to use the DLL approach would be if the device uses a non-standard communication interface (USB Raw for instance), the protocol is not documented anywhere and/or you happen to get the well made, fully tested and ready LabVIEW VI library that wraps the DLL. Anything else is a VERY STRONG indication to go with the VISA functions. It keeps everything fully in LabVIEW source code so you can debug and modify it as needed when your requirements change in the future.

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
Message 12 of 14
(650 Views)

Hi again,

I did what you said in the previous replies;

-Throw away the BytesAtSerialPort completely, wire a constant of 20 or higher to the number of characters to read on the VISA Read function. DONE

-

Then go to your front panel and right click on the "string to write" control and select ""\" codes Display" and enter into that control 

!001:SYS?\r

or <CR> is stated. DONE

I also entered this values for com port as my device manuel says

115200 baudrate

8 data bits

1 stop bit  

No parity

 

When I start run button at the begining it gives me the right value of the device voltage in the string indicator.However, a moment later it, y VI still gives me timeout error. What should I do?I attached the display of what I mean. Thanks you all for your helps again. 

 

Also I attahced my VI.

0 Kudos
Message 13 of 14
(612 Views)
Solution
Accepted by topic author quanthema

You inconviniently forgot the step about adding a constant 13 to the termination character input on the VISA Configure Serial Port function.

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
Message 14 of 14
(604 Views)