Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   A newbie to Labview Questions about interrupts (http://www.chiefdelphi.com/forums/showthread.php?t=89462)

Gal Yaad 18-01-2011 11:38

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

Alan Anderson 18-01-2011 12:11

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.

Kevin Sevcik 18-01-2011 13:01

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.

Greg McKaskle 18-01-2011 13:03

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

Ether 18-01-2011 13:09

Re: A newbie to Labview Questions about interrupts
 
Quote:

Originally Posted by Greg McKaskle (Post 1002798)
It is also possible to setup sensor triggers -- this is the closest to interrupts that most teams will need.

Piggybacking on Greg's post: The FPGA in the cRIO handles all the high-speed stuff like detecting and responding to (counting) things like encoder signal edges - things that you might be thinking would require an interrupt.




All times are GMT -5. The time now is 10:07.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi