11-09-2012 12:52 PM
I have a VISA control (com ports) in a sub vi and I am trying access this control from the front panel of the main VI. What is the best way to do this?
11-09-2012 01:03 PM
The best way would be to pass the reference into the subVI via the connector pane.
11-09-2012 02:27 PM
@crossrulz wrote:
The best way would be to pass the reference into the subVI via the connector pane.
For scalability, you could use a typdef'd cluster containing all the ref's you're interested in - in this case, just one. That way, you can add refs to the typedef'd cluster and you won't break your sub-VI. To use it, it's just a matter of unbundling the ref's inside the sub-VI. Very useful if you're building a complicated interface.
11-09-2012 04:12 PM
@Echoman wrote:
I have a VISA control (com ports) in a sub vi and I am trying access this control from the front panel of the main VI. What is the best way to do this?
I would avoid that......................
Being a huge fan of "Code it Once" and a guy who hate looking all over a large project to debug I allways create a "Resource Module" (A special Action Engine the encapulates All I/O between LabVIEW and Anything else)
Of course, you should read Ben's Famous Community nugget
The callers need to know nothing about the RM's private data since it is only used to do I/O with this device so it is the not even wired
A quickie example is shown below: as well as a example use.
01-07-2014 08:31 AM
Dear Jeff , I use two loops acessing the same serial, someone said the action engine will solve the race problem, but I do not know how to program with action engine, will u please give me an example on VISA. thanks
01-07-2014 09:04 AM
zhm,
Those pictures in my last post are snipettes. drag them to your desktop, open a blank block diagram, drag from your desktop to the diagram. POOF! 1 each example provided!
P.S I reciently "Jinged" a demo of this and FORGOT to tag the darn thing- Search isn't great and my spelling is almost as bad as the search so, free Kudos to the poster who finds that darn link and posts it here (so I can go back and tag it)
01-07-2014 09:29 AM
@zhm0204 wrote:
Dear Jeff , I use two loops acessing the same serial, someone said the action engine will solve the race problem, but I do not know how to program with action engine, will u please give me an example on VISA. thanks
Please check your original thread for another suggestion.
01-07-2014 12:05 PM - edited 01-07-2014 12:05 PM