|
Re: declaring a servo in begin.vi (advanced framework)
First drag out a Servo Open vi. Right-click the PWM Channel and click "Create > Constant". Next, Right-click on the Servo Ref on the right and click "Create > Control". Switch to the Front Panel and copy the Servo Ref. Delete it and open up the RobotData typedef. Paste the control and add it to the cluster. Go back to the Begin vi and pull down on the Cluster Elements By Name. You should see your newly added Servo Ref. Wire the output of the Servo Open vi into the Cluster. Now where ever RobotData is, you can access the servo. If you want to add it to a different typedef, just do the same things, only with a different typedef.
Hope that helps!
|