04-18-2006 06:21 PM
04-19-2006 12:41 PM
04-19-2006 03:07 PM
Thanks for your response. I have a couple of questions...
The vi in the lab is continuously running at the drill's side. So, if a user sends a motor command from their office using the method you mentioned, where is the main vi receiving it in the code? Is it pressing the button remotely? Or is it sending the commands with drilling parameters directly to the motor? One issue is that , the motor commands on the front panel of the main-lab vi opens up a sub vi for the operator to choose the drilling/motor parameters, and then they have to press an ok button. So, what happenes if the sub vis pop up on the main vi? How will they close or is there a way to avoid that? OR I would like to have the parameters from the office be input into the subvis inputs. Is this possible to add?
Thanks!
@jarrod S. wrote:
Hi Sam, The good news is that you have lots of options in this category. If you happen to be a TCP guru, then we can go down that route, but I think in general it would be unnecessarily difficult for what you want to accomplish. I would strongly recommend using VI Server (i.e. invoke nodes, application and VI references, etc) to programatically lauch the VI in your lab that controls your motor. You would have a popup dialog VI in your office that would allow the user to input parameters for the motor, but then all it would do is dynamically launch the VI in your lab and pass it those parameters. I would recommend using a Call by Reference Node to call the VI in the lab and pass the parameters to it. I will attach some tutorials on using it. I'll also attach a little mock example below. Just make sure both VIs are in the same directory and run the VI set to be in the office.
Your other option depends on how you send your data to the motor. Are you using a GPIB instrument perhaps? If so, you can actually set up a Remote VISA connection and control the instrument directly from your office as if it were connected to the computer in the office. No extra VIs to call in the lab, nothing. Just a modified VISA Resource Name. Let me know if that's the case. In any case, the VI Server example above is really pretty simple and a very powerful programming technique!
Calling a VI by Reference Tutorial
04-20-2006 03:03 PM