So after 6 hours of troubleshooting, my programming team and I have finally found out why the analog sensors vi’s weren’t working in labview. First of all, when the “open” vi asks for a channel and slot input, instead of just putting in 1, 2, etc… we needed to put in “slot one” and “AI 1” for slot one channel one. Secondly, since we didn’t have any analog output devices we decided we would just use channel 8 in slot one, which should have given us a modified battery voltage response. The only problem is that it seems that there is a conflict with this situation. I believe that since the DS is also trying to read the battery voltage from this channel, and so there is some sort of a programming conflict and the battery voltage won’t show up in labview. I don’t know if there is any work around to this problem, I just thought I would let other teams know in case there were in the same situation as ours.
The first part of that, using 1 instead of the enum “AI 1” will result in a coercion dot, and will work as long as you know the encoding. This is sometimes useful when casting between enums or when using a loop to get all values. So in other words, this isn’t really an error, but when doing constants, it is much more readable to use the specific ones.
Greg McKaskle
Hm, i’m really interested to know where I could have read about this beforehand.
When make controls and constants for in LabVIEW (especially for WPILib) it will help you greatly if you right-click on the input terminal and select Create » Constant/Control. This will ensure the constants and controls are the correct data type(s) etc.
Anytime you are given a subVI that you intend to use, I recommend looking at the front panel. You will usually get a better sense of what the author intended to have wired in. You can then copy/paste, or from the icon create control or constant. The create… is a short cut to opening and copy/paste.
Greg McKaskle
I call that action the “easy button” with my team.
I can’t beleive there isn’t a hotkey for “create constant”