Jump to content
Benyamin.KH20

port serial

Recommended Posts

That is a picture of a VISA control allowing you to select a COM port for some operation.  What is your problem?

  • Like 2

Share this post


Link to post
Share on other sites

That is a picture of a VISA control allowing you to select a COM port for some operation.  What is your problem?

tnx

in this picture there is'nt  icon

tt.png

but in this picture

why is this icon?

ttt.png

Share this post


Link to post
Share on other sites

  • 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?

  • Like 1

Share this post


Link to post
Share on other sites

 

  • 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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.