Jump to content

control references within subvis


Recommended Posts

Hi all,

I have a small problem I'm not sure how to deal with. I've written a subvi to control the movement of a stepper motor. The subvi sends the appropriate command to make the motor perform a movement and then monitors the stepper driver until the movement is complete (it's marginally more complex than that - it deals with limit switches on the drives and a hardware E-Stop implementation as well). What I want is for the top level VI which calls this subvi to know when the drive is in motion. I have a boolean control within the subvi, but obviously, the top level vi can't see that. I created a (boolean typed) control reference and property node within the subvi and hooked it up to the connector pane. This works as I expected, but I want this functionality to be optional - and if I don't connect a control reference to the subvi, I get an error saying "invalid reference".

How do I make it not worry if I don't wire a reference in?

Thanks in advance!

Paul

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
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.