|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
A newbie to Labview Questions about interrupts
Hello
I wish to Team 1943 with programming this year. I come from the field c\c++ embedded and I have almost zero experience with labview. From what I have seen in the team code, their entire robot is based on if statment. My question is - is this how it is supose to be? can I bind the DI\AI\Joystick into interrupts? Thank You, Yaad Gal |
|
#2
|
|||||
|
|||||
|
Re: A newbie to Labview Questions about interrupts
Newcomers to LabVIEW should probably not be thinking about interrupts. They aren't "the right way" to do simple tasks, and even complex tasks usually have good non-interrupt ways to implement them.
I don't understand what "their entire robot is based on if statment" means. The LabVIEW team code runs specific Virtual Instruments at specific times. Begin.vi runs once during initialization. Autonomous Independent.vi is started at the beginning of Autonomous Mode and is automatically stopped when Autonomous Mode is over. Teleop.vi is run each time the robot receives a communication packet from the Driver Station, and is where just about everything the team wants the robot to do gets done. Finish.vi runs once when the program ends...which never happens except when you click the big "Finish" button on the Robot Main.vi front panel during development. |
|
#3
|
|||||
|
|||||
|
Re: A newbie to Labview Questions about interrupts
C++ and Java are two other options available for programming the robot, so you may want to discuss those options with the team and see if they'd be comfortable working in C++ where you could better assist them. If they're already comfortable in Labview and don't know any C++ or Java, this probably isn't a good idea, but it's certainly an option to discuss with them.
|
|
#4
|
|||
|
|||
|
Re: A newbie to Labview Questions about interrupts
I'm not sure I understand the "if statement" description either, but perhaps an overview of the architecture and framework will help.
The cRIO and driver station are running independently and take part in a notify/respond protocol. As an example, for teleop, the DS will send the latest values of each joystick to the robot, the robot will extract those from the packet and store them so they can be retrieved with a WPI function. The arrival of this packet is often used by the robot to measure and other sensors and update outputs and setpoints. The framework also supports timed tasks which can operate independent of the DS packets. It is also possible to setup sensor triggers -- this is the closest to interrupts that most teams will need. If you have other questions, please ask. Greg McKaskle |
|
#5
|
||||
|
||||
|
Re: A newbie to Labview Questions about interrupts
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|