05-10-2019 04:47 PM - edited 05-10-2019 04:52 PM
I am trying to control 6 individual relays with the same button in labview and I cannot figure it out. I am extremely new to labview and all of my knowledge of it has relied on the internet.
I am using the old 2012/2013 labview software because I am using a CRio on my robot. I began my project by using the FRC basic robot code.
Basically what I am trying to do is activate each relay when I press the button x amount of times.
For example, shoot relay one when i press the button the first time, then I press a different button to switch to the next relay, then press my first button to shoot the next relay I switched to. The second button would go through all of the relays 1-6 and then go back to 1 once I pressed the button again and the first button would shoot whatever relay I have chosen.
I might be overthinking this, in Begin. Vi I have set up for a regular relay function and in Teleop.Vi I have it setup for button 1. I setup a "cascading" mechanism where it goes through 6 "select" values and adds one variable before it continues to the next then finishes in the set values port of the relay setup.
Please understand I need a lot of help and I am very new to labview.
I have looked all over the internet for the past week searching for an answer, I must be the only crazy person trying to do this.
Side note: I have no idea how to put in multiple relay inputs.
05-11-2019 12:33 AM - edited 05-11-2019 12:34 AM
05-13-2019 10:43 AM
I do not have any of the WPI Robot libraries loaded on my work PC so I can't create a complete example for you so you will need to fill in some of the missing parts.
You have 2 buttons on the JOY Stick that you wish to use.
1 button to FIRE the relay?
1 button to rotate through 6 relay?
The event structure will not work on the Robot. I have created some "one shots" to be used on your JOY sticks button with feed back nodes. Paste this code in your Teleop.vi.
Maybe post your code that you have done so far.