Ok so we have 1 Solid State Relay all set up connected to the PDP and RoboRIO, now how do i go by programming it in LabVIEW to turn on a light?
Depending on what you wired it to on the roboRIO, maybe something like this
An where does this go? teleop.vi?
It depends on how/when you want to turn the LEDs on.
If you always want the lights on, you can put it all in Begin (and do away with the LED Relay names altogether-and you don’t need the Select-just use the ON constant).
If you want to turn the lights on with a button or off with the same or another button, then Teleop would be appropriate (and the definition on the left above would go in Begin.vi).
so would i enter the entire thing into begin, or just the left side of the snippet, and the other in teleop for button?
Begin.vi
runs when the code starts executing, and it runs once. (For example: when the roboRIO boots up and brings the code you set as Run as Startup, or when you run Robot Main.vi
from LabVIEW)
Teleop.vi
runs continuously (once every ~20 ms) just when the robot is in Teleoperated mode and Enabled.
Usually you will open references in the Begin and use get/set methods in the Teleop. However, as @Mark_McLeod says, do what makes the most sense for your application.
So far i have the open relay in begin.vi, the rest for on & off i don’t.