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

Calling a LabVIEW vi from MATLAB and inputting values

$
0
0

Hi,

 

I have a vi written by my supervisor which requires the 'VISA resource name' (which is the USB port, in my case COM4) and has a box called 'write buffer' in which you can type commands to control a Harvard apparatus syringe pump.

 

So far I've got code to open the vi and can write the '00run' command into the write buffer but it will not allow me to put anything into the 'VISA resource name box', maybe because it's a dropdown box of detected devices? Anyway I need to set this to COM4 in order to comminucate with my pumps but I have been hitting my head against a wall for hours and can't find any solutions online.

 

My error is as follows:

In MATLAB:

Undefined function or variable 'COM4'.

Error in VI_Call (line 6)
vi.SetControlValue('VISA resource name',COM4);

 

When it opens the vi but can't fill the VISA box:

Error.png

 

I will attach my MATLAB script and vi and hopefully someone can let me know how to get around this 🙂


Viewing all articles
Browse latest Browse all 5565

Trending Articles



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