Go to Post While those ideals might exist in black and white perfection; in the real world, with very rare exception, they can only be implemented as compromises in shades of gray. - gblake [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 09-02-2013, 12:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Robot "twitching?"

All the stuff that feeds into FIRE including the joystick gets for axes and buttons, can all be copied and pasted into clear space in Periodic Tasks.vi.

Then put a While loop around it that never ends, and put a 10ms Wait in there so it doesn't suck all the life out of the cRIO.

There's nothing special about Teleop that gives it exclusive access to the Joystick controls. They can be read in Teleop and in Periodic Tasks, or other places, too.
The advantage of Teleop is that it only gets called whenever there are new joystick values to process, so it's more efficient.
Run the loop in Periodic Tasks a little faster than the 20ms communication packet rate and it won't matter that you're sometimes reading joystick info twice sometimes. The duplicate info won't be the the signal telling you to FIRE.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 09-02-2013 at 12:58.
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2013, 13:13
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Robot "twitching?"

Quote:
Originally Posted by Mark McLeod View Post
Run the loop in Periodic Tasks a little faster than the 20ms communication packet rate and it won't matter that you're sometimes reading joystick info twice sometimes.
How do I do that? Just change the delay in the loop I made?

And thank you guys for all the quick responses!!

Last edited by Invictus3593 : 09-02-2013 at 13:28.
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2013, 14:17
vic burg's Avatar
vic burg vic burg is offline
Alumni, Mentor, & AmeriCorps VISTA
AKA: Captain Obvious
no team
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Florida
Posts: 544
vic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to behold
Re: Robot "twitching?"

We were having the same problem and tried your safety solution but it didn't fix it. Now it's not responding at all.
__________________
RoboColts--Hallandale Elementary
--Thanks goes out to Cody C for making me ^^this^^ user bar!!!!
Nuts and Bolts help the world go 'round.... They also keep us all together. Including the Robots we build. -vic burg
I have been dubbed an honorary member of 1902 and 744 (by the members).
And yes, I am in the habit of collecting team t-shirts.
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2013, 14:21
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Robot "twitching?"

I got the robot to stop twitching! Not by disabling the safety, but by moving the code I had running delays to periodic tasks. But now the joystick values don't ever get updated. Without the compressor, the sequence runs perfect, just how i wanted it

Last edited by Invictus3593 : 09-02-2013 at 14:36.
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2013, 14:37
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,751
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: Robot "twitching?"

Quote:
but it didn't fix it. Now it's not responding at all.
All you did was disable the safety in Begin? And if you turn it back on?

Are there messages being sent to the diagnostics?

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 09-02-2013, 14:41
vic burg's Avatar
vic burg vic burg is offline
Alumni, Mentor, & AmeriCorps VISTA
AKA: Captain Obvious
no team
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Florida
Posts: 544
vic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to beholdvic burg is a splendid one to behold
Re: Robot "twitching?"

Quote:
Originally Posted by Greg McKaskle View Post
All you did was disable the safety in Begin? And if you turn it back on?

Are there messages being sent to the diagnostics?

Greg McKaskle
Yes, yes and yes. More details here: http://www.chiefdelphi.com/forums/sh...d.php?t=113119
I don't want to thread jack.
__________________
RoboColts--Hallandale Elementary
--Thanks goes out to Cody C for making me ^^this^^ user bar!!!!
Nuts and Bolts help the world go 'round.... They also keep us all together. Including the Robots we build. -vic burg
I have been dubbed an honorary member of 1902 and 744 (by the members).
And yes, I am in the habit of collecting team t-shirts.
Reply With Quote
  #7   Spotlight this post!  
Unread 09-02-2013, 15:32
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Robot "twitching?"

Quote:
Originally Posted by Invictus3593 View Post
But now the joystick values don't ever get updated.
That probably means the Joystick Gets are misplaced.
Post the code you have now and we'll help troubleshoot that.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #8   Spotlight this post!  
Unread 11-02-2013, 16:05
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Robot "twitching?"

Here are both Teleop and Periodic Tasks. Do you need begin for the compressor's start?

The sequence in periodic works great, but no relay fired.

EDIT: It gave me an code of "-44027" when I put a probe on the error line in Begin.vi. I'm not sure what that means, but it told me it's an unidentified error.
Attached Files
File Type: vi Teleop.vi (37.5 KB, 6 views)
File Type: vi Periodic Tasks.vi (33.3 KB, 3 views)

Last edited by Invictus3593 : 11-02-2013 at 16:23.
Reply With Quote
  #9   Spotlight this post!  
Unread 11-02-2013, 16:20
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Robot "twitching?"

No Relays were harmed in the running of this code, because those are solenoids.

What kind of solenoid are you using?
The code assumes it is a single solenoid (one physical set of wires).
the solenoids we've goten in the kit the past couple of years have been double solenoids (two sets of physical wires).

Post your Begin so we can check that out too.

P.S. to your edit.
A -44027 error is "FRC: The DIO channel has already been allocated."
That means you've specified the same DIO more than once in Begin.vi. Probably the default DIO 1 came up twice.
You can get info on the mysterious error numbers by going to Help->Explain Error... and typing in the error number (remember to include the negative sign if appropriate).
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 11-02-2013 at 16:25.
Reply With Quote
  #10   Spotlight this post!  
Unread 11-02-2013, 16:26
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Robot "twitching?"

Quote:
Originally Posted by Mark McLeod View Post
What kind of solenoid are you using?
Single, it's the one from the kit, but we only connected one set of wires from the double solenoid, it works great *thumbs up!*

Here's begin for ya!
Attached Files
File Type: vi Begin.vi (54.6 KB, 5 views)
Reply With Quote
  #11   Spotlight this post!  
Unread 11-02-2013, 16:29
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Robot "twitching?"

You're right, I was opening DIO1 twice instead of both 1 & 2! It works perfectly now! Thanks for all your help man!
Reply With Quote
  #12   Spotlight this post!  
Unread 11-02-2013, 16:40
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Robot "twitching?"

I see the two DIO 1's in there.

The Watchdog code isn't necessary, it's pretty circa 2009. The Safety Config took over that job.
Where are you feeding it? Unfed it will shut things down.

A double solenoid shouldn't work treated as a single solenoid, because real singles have a spring return, while doubles do not.
I'll have to try that myself at robotics tonight. Learn something new every day.

Is the first green LED on the Solenoid Module going on/off when you run your sequence? That's the best verification that your code is working.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 11-02-2013 at 16:45.
Reply With Quote
  #13   Spotlight this post!  
Unread 07-03-2013, 23:52
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
Re: Robot "twitching?"

I don't know if you already did it. But all you need to do is put a "dead area". In other words what is happening is your joystick are actually sending a slight amount of value to the motors, even though they aren't pushed. So just create a code that says if joystick value is between -.1 and .1 don't move.
Hope this helps,
Alex Guckenberger
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 12:06.

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