11-06-2024 04:02 AM
i want to use pyvisa instead of visa blocks in labview, is it possible to do it??
11-06-2024 05:43 AM
Hi Anup,
@AnupSW13 wrote:
i want to use pyvisa instead of visa blocks in labview,
So you want to call a Python script (that uses pyvisa calls) from LabVIEW instead of VISA functions directly in LabVIEW?
Why?
11-06-2024 06:13 AM - edited 11-06-2024 06:14 AM
That's about as logical as wanting to go to the 100th level of a skyscraper, but not wanting to use the elevator but rather the fire escape stairs. Is your LabVIEW building in fire? 😁 Or is it about the physical exercise you want to have?
11-06-2024 11:03 AM
@AnupSW13 wrote:
i want to use pyvisa instead of visa blocks in labview, is it possible to do it??
Just why?
11-07-2024 05:06 AM
I want to check protocols , like how it communicate with labview .
as there are limitations to check every protocol thats why
11-07-2024 05:35 AM - edited 11-07-2024 05:43 AM
@AnupSW13 wrote:
I want to check protocols , like how it communicate with labview .
as there are limitations to check every protocol thats why
I have no idea what that means. Can you be more specific what using pyvisa from LabVIEW would help you with that?
pyvisa is a somewhat roundabout way of implementing VISA for use under Python. As such it is just a limited reimplementation of VISA (if you use their native VISA layer instead of the NI-VISA interface in it) and as such offers no advantages for use in LabVIEW, compared to the native LabVIEW VISA interface. Rather the contrary is true, you add an additional complication of having to interface to Python from LabVIEW, to be able to use pyvisa. While that's possible, it for sure adds extra complexity, intermediate translation layers and much less interactive debug possibilities than the native interface.
Incidentally I just finished a reimplementation of a Python interface to a remote software (Thales) in LabVIEW. The manufacturer has a comprehensive Python interface for their system and their LabVIEW support consists of having an additional Python module that translates their class based Python driver into a function based one for use through the Python node. Cumbersome, tricky to get right as the various module paths need to fit exactly, a major pita when switching between 32-bit and 64-bit mode as the Python installation needs to be adapted too and the modules installed in the right environment. That the performance of all this certainly doesn't impress either, is a minor detail. I don't expect high speed from communicating with an instrument even if that is through TCP/IP.
Reimplementation of the whole Python driver in LabVIEW did cost a few days, using the native LabVIEW TCP nodes. But it now works independent of what bitness or even underlaying OS it runs on, doesn't need a Python installation alongside LabVIEW that is setup exactly right and is actually more responsive too.
11-07-2024 06:25 AM
Discussion is related to this thread…