Go to Post Pro: Very easy to build with. Con: HEAVY AS ELEPHANTS - Tetraman [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2011, 11:38
Gal Yaad Gal Yaad is offline
Registered User
FRC #1943
 
Join Date: Feb 2006
Location: Isreal
Posts: 3
Gal Yaad is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2011, 12:11
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2011, 13:01
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,587
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
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.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2011, 13:03
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2011, 13:09
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: A newbie to Labview Questions about interrupts

Quote:
Originally Posted by Greg McKaskle View Post
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.


Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:24.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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