Jump to content

piZviZ

Recommended Posts

In my project i have 2 task

 

(1).Read data of sensor (attached to arduino board) serially  and display on LabVIEW.

(2).Control output(just ON-OFF) pins of arduino using LabVIEW.

 

 

So,for that i am using TAB in labview.created 2 TAB called Oscillospe and Input.

 

If i first start Oscilloscope it work well.

But when i come to Oscilloscope tab after using Input tab.

 

It gives Time out error (VISA read)

 

If i am executing in Highlight mode it works well

 

tab--event.vi

Link to comment

I feel like you don't fully understand how event structures should be used.  So if your VI starts, it will init VISA with the port selected.  At no time after starting the VI will you be able to change the com port.  This maybe fine for your test but for a real built application your VI will start running before you can interact with the controls.  

 

Then your event structure will wait forever, idle doing nothing, until you change the tab control...is this what you want?  Wouldn't it be best if you read the value of the tab and then acted on it?

 

But i think the source of your problem is that you only are writing "oo" once then reading over and over, but your device probably only sends it out once for every request.  

 

Attached is an updated version that also has some basic error handling (stop on error and display the error).  It also allows for changing of the port and baud rate while running, and supports the normal windows close methods to stop.

Tab Event Hooovahh Edit.vi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.