Jump to content

port serial


Recommended Posts

Posted

 

  • You get an icon there because the port has already been opened or used I believe.  Do you have a VISA close in your code when you are done with the port?

 

 

this is my code

 

1.png

 

2

 

 

2.png

3

 

3.png

Posted

this is my code

 

 

Aside that it looks awful if you do not have a least a 60 inch screen, you never let the loop terminate programmatically. So to terminate your program you have to abort it. That does NEVER let the Close VISA function execute and your port stays open until you shutdown LabVIEW.

  • Like 1
Posted

this is my code

 

No that is pictures, code is in the form of VIs.  In any case rolfk is right, you never close the port, because you never close your resource, because you stop your car by crashing it into a tree instead of using the brakes.  Use proper coding techniques to exit your program, and perform clean up operations on exit/stop.

Posted

No that is pictures, code is in the form of VIs.  In any case rolfk is right, you never close the port, because you never close your resource, because you stop your car by crashing it into a tree instead of using the brakes.  Use proper coding techniques to exit your program, and perform clean up operations on exit/stop.

 

:blink::wacko:

 download

Posted

Thank you but please next time don't upload to some fly by night uploading site.  Use this forum that's what it is here for.

 

And the comment still stands that you have a false constant wired to the while loop so there is no hope to releasing the serial port resource.

 

EDIT:  That has to be a maintenance nightmare.  Way too many locals, too large of a BD, too many property nodes, too many cases, on the bottom center, no event structure for handling the run-time menu.  Look into a state machine.  And arrays for data instead of 60+ scalars.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.