OCCRA
Go to Post If it gets people talking about not only robots but science and technology, it's all good. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Events   CD-Media   CD-Spy   FRC-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 04-23-2012, 03:20 AM
legogeek24's Avatar
legogeek24 legogeek24 is offline
Registered User
AKA: Dirk
FRC #3562 (LiveWire)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Pocatello, ID
Posts: 87
legogeek24 has a spectacular aura aboutlegogeek24 has a spectacular aura aboutlegogeek24 has a spectacular aura about
URGENT: CAN Jag error code 1 - dequeue element in acquire semaphore

Hey all,

I am trying to inalize code for championships. My team leaves later today (Monday), and our shooter, which was working earlier, now will not. I am running CAN on it, speed control with an encoder.

I know the electronics are right, as it will run properly in a different project. But in my LabVIEW project containing our actual drive code, I get this:
"error code 1:
Dequeue element in acquire semaphore.vi:1->WPI_CAJaguar_SetTransaction.vi:28->WPI_MotorControlSetOutput.vi:9->Periodic Tasks.vi->Robot Main."

I would post my code, but I'm typing this post from my phone as our build site has no Internet access.

What I can tell you is that the jag runs perfectly fine with what I believe to be identical code in a different project. It is the only jag in the circuit, firmware 101, off the can bus, we are not using 2CAN.

It is output to in periodic tasks, on a 20ms delay. I can't figure out what the problem could be, and I only have a vague idea of what the error actually is. I understand the concept of a semaphore, but I don't know where I should or shouldn't be setting one.

Any help would be much appreciated, I only have today to get this working before we leave for St. Louis.
__________________
4 year FIRST alumnus and current MIT Computer Science student
Mentor for LiveWire 3562 and The Arabian Knights 4928
"1...2...3562!!!"
Reply With Quote
  #2   Spotlight this post!  
Unread 04-23-2012, 09:46 AM
mjcoss mjcoss is offline
Registered User
FRC #0303
 
Join Date: Jan 2009
Location: Bridgewater,NJ
Posts: 69
mjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the rough
Re: URGENT: CAN Jag error code 1 - dequeue element in acquire semaphore

Quote:
Originally Posted by legogeek24 View Post
Hey all,
...
I get this:
"error code 1:
Dequeue element in acquire semaphore.vi:1->WPI_CAJaguar_SetTransaction.vi:28->WPI_MotorControlSetOutput.vi:9->Periodic Tasks.vi->Robot Main."
Note: Labview isn't my forte but ...
The error message to me implies that your code is accessing something that wasn't properly initialized, probably the CANJaguar controller. I'll take a quick look at the WPI_CANJaguar_SetTransaction vi and see if I can get a sense of what could have gone wrong. The CAN bus uses messages to update the Jaguars. The message are queued and dequeued and I suspect a semaphore is used to protect access to the queue.

Took a quick look at the vi, and it was as I suspected, it tries to acquire the semaphore, and then sends the command. The semaphore is part of the CANJaguar reference that is passed in. I would suspect that the CANJaguar reference is bad in some way. Without seeing the project that fails, I'm not sure what else to tell you.

Last edited by mjcoss : 04-23-2012 at 12:29 PM. Reason: Updated
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 06:18 AM.

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


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