Go to Post In my opinion, I wouldnt want gifts or praise from people about my help to a robotics team, all I would want is a thank you, that would make all my hard work and efforts worth while and it would prove to me that I could actually be making a difference in the students lives - Mike Schroeder [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 07-02-2009, 15:02
Mr.Macdonald Mr.Macdonald is offline
Registered User
FRC #2272
 
Join Date: Jan 2009
Location: Conejo Valley Robotics
Posts: 26
Mr.Macdonald is an unknown quantity at this point
Re: Invalid PWM Channel Index

One more thing. We're also getting a PWM Channel Already allocated error. I'm including a screenshot.
Attached Thumbnails
Click image for larger version

Name:	pwm already allocated error.JPG
Views:	37
Size:	31.3 KB
ID:	7354  
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2009, 15:45
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,752
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: Invalid PWM Channel Index

From the probe, the value in the channel is indeed invalid.

The PWM stuff is used for both servo and motor, and of course drive uses motor. So, one of those opens either has nothing wired to it and it defaults to the invalid channel, or it has a constant wired up with invalid.

Also, make sure you are calling opens and you aren't just typing stuff into a PWM reference.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2009, 16:02
Mr.Macdonald Mr.Macdonald is offline
Registered User
FRC #2272
 
Join Date: Jan 2009
Location: Conejo Valley Robotics
Posts: 26
Mr.Macdonald is an unknown quantity at this point
Re: Invalid PWM Channel Index

Could you explain what you mean by:

Quote:
So, one of those opens either has nothing wired to it and it defaults to the invalid channel, or it has a constant wired up with invalid.

Quote:
Also, make sure you are calling opens and you aren't just typing stuff into a PWM reference.

Is it possible to talk with you or someone from NI over phone or IM
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2009, 20:49
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,752
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: Invalid PWM Channel Index

Actually, the open requires the channel to be wired. Check each Motor open and see that you have the channels wired that you meant to.

If you are using the drive VIs, check those opens. If using servos, check those too.

Finally, the next time you run, make sure the dashboard is open. It will show you if you have errors. I suspect that you have an issue where a channel is already in use, produces an error, and then the refnum is invalid.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 11-02-2009, 19:30
aerophd2001 aerophd2001 is offline
Software Mentor - Team 2366
AKA: Andy
FRC #2366 (Tesla Robotics)
Team Role: Mentor
 
Join Date: Mar 2008
Rookie Year: 2008
Location: Blue Springs, MO
Posts: 7
aerophd2001 will become famous soon enough
Re: Invalid PWM Channel Index

Preface: I am a Certified LabVIEW Architect.

In our Teleop/Init I've placed a routine that allocates 8 channels in a row (inside a For Loop) to allocate 8 Servos. I'm converting the iteration terminal of the loop to a U8 then typecasting it to the PWMChannel.ctl typedef enum prior to the value entering the Servo/Open.vi. We're receiving the -44037 (PWM Channel is already allocated) error ... but only on the 1st two of the eight channels. The last 6 are allocating just fine and in operation work perfectly.

Any ideas what's going on here?
__________________
(Test + Refine Code + Deploy) ^ n
Reply With Quote
  #6   Spotlight this post!  
Unread 11-02-2009, 19:50
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Invalid PWM Channel Index

Quote:
Originally Posted by aerophd2001 View Post
Preface: I am a Certified LabVIEW Architect.

In our Teleop/Init I've placed a routine that allocates 8 channels in a row (inside a For Loop) to allocate 8 Servos. I'm converting the iteration terminal of the loop to a U8 then typecasting it to the PWMChannel.ctl typedef enum prior to the value entering the Servo/Open.vi. We're receiving the -44037 (PWM Channel is already allocated) error ... but only on the 1st two of the eight channels. The last 6 are allocating just fine and in operation work perfectly.

Any ideas what's going on here?
The servo VIs use the PWM outputs (and are shared between the Jaguar, Victor, Servo, PWM, and Robot Drive libraries). The default code uses PWM 1 and 2 for the Robot Drive Library, could you be trying to reallocate them?
Reply With Quote
  #7   Spotlight this post!  
Unread 11-02-2009, 20:09
aerophd2001 aerophd2001 is offline
Software Mentor - Team 2366
AKA: Andy
FRC #2366 (Tesla Robotics)
Team Role: Mentor
 
Join Date: Mar 2008
Rookie Year: 2008
Location: Blue Springs, MO
Posts: 7
aerophd2001 will become famous soon enough
Re: Invalid PWM Channel Index

Quote:
Originally Posted by Joe Ross View Post
The servo VIs use the PWM outputs (and are shared between the Jaguar, Victor, Servo, PWM, and Robot Drive libraries). The default code uses PWM 1 and 2 for the Robot Drive Library, could you be trying to reallocate them?
So you're saying that PWM Channels 1 & 2 cannot be used for servos? (or: only 3-10 *can* .. ?)
__________________
(Test + Refine Code + Deploy) ^ n
Reply With Quote
  #8   Spotlight this post!  
Unread 11-02-2009, 20:20
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Invalid PWM Channel Index

Quote:
Originally Posted by aerophd2001 View Post
So you're saying that PWM Channels 1 & 2 cannot be used for servos? (or: only 3-10 *can* .. ?)
You can use PWM channels 1 & 2 for servos, you just have to delete the Robot Drive VIs (or change which PWM channels they use).
Reply With Quote
  #9   Spotlight this post!  
Unread 11-02-2009, 20:42
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,752
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: Invalid PWM Channel Index

If you look at a digital sidecar, it has a row of PWM connectors. Each connector can be used for motors or servos depending on if they are jumpered. The SW API needs to deal with this HW resource limitation.

So, once you've designated a PWM channel is used for one thing, it is reserved and cannot be reopened for the other purpose. What Joe is pointing out is that the template code already reserves the first couple channels as being for motors. That means that until they are closed, they cannot be opened for servos and will return an error.

Greg McKaskle
Reply With Quote
  #10   Spotlight this post!  
Unread 11-02-2009, 23:23
aerophd2001 aerophd2001 is offline
Software Mentor - Team 2366
AKA: Andy
FRC #2366 (Tesla Robotics)
Team Role: Mentor
 
Join Date: Mar 2008
Rookie Year: 2008
Location: Blue Springs, MO
Posts: 7
aerophd2001 will become famous soon enough
Re: Invalid PWM Channel Index

I found the source of the error. It was all the way back in the Begin.vi within Robot Main.vi. I didn't know (until I just now found it) that the main drive motors are being initialized within Begin.vi. I'm making my modifications now and will test tomorrow afternoon when we continue with our testing.
__________________
(Test + Refine Code + Deploy) ^ n
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid Address Farnak Programming 4 17-04-2008 19:09
Invalid Address team 803 Programming 20 21-02-2006 09:10
2005 Robot Picture Index Gasperini Robot Showcase 9 09-04-2005 13:06
IRI popularity index Joe Ross Fantasy FIRST 5 03-07-2004 12:36
Metal/Materials/Tools Source Index dlavery Technical Discussion 0 12-01-2002 00:36


All times are GMT -5. The time now is 21:42.

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