Go to Post but who knows what you might want to try next? - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
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 06-02-2011, 05:32
lior_regev lior_regev is offline
Registered User
FRC #2630
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2006
Location: Israel
Posts: 8
lior_regev can only hope to improve
CAN LabVIEW help

Hello,
I'de love an example on how to use the "Sync Group" VIs in LV.
an explanation is ok too but i would appreciate an example.

thanks in advance
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2011, 12:18
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: CAN LabVIEW help

Sure. I'll do an explanation first, and try to get a screenshot or video up later.

If you set a motor output with a sync group of "0", it will update its output immediately. (This means the update does not wait for any sync group to take effect)

If you set a motor with a sync group of decimal 64 (binary 00100000), then it will wait for the 6th sync group to be updated. If you wired decimal 65 (binary 00100001) into the "update sync group" command, it would update both the 6th and the 1st sync group.

If you wanted to update ALL the sync groups, you would wire a value of 255 (decimal 11111111).


EDIT:
So, for your example, how complex should it be?
Do you want to see how to update a single sync group?


Do you want to put a delay between when you send the motor outputs, and when you send the sync group?

Do you want to update multiple sync groups at once?

Do you want to be able to update a single motor through either of two sync groups?

Do you want a video to walk you through this?
__________________
-- Marshal Horn

Last edited by kamocat : 06-02-2011 at 12:24.
Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2011, 12:35
lior_regev lior_regev is offline
Registered User
FRC #2630
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2006
Location: Israel
Posts: 8
lior_regev can only hope to improve
Re: CAN LabVIEW help

Well, I'de love a video.
Also, is there a way of talking 2 Jags and making them have the same value all the time? much like the Y cable on PWM where you only have to set one motor in the code...
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2011, 12:40
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: CAN LabVIEW help

Quote:
Originally Posted by lior_regev View Post
Well, I'de love a video.
Also, is there a way of talking 2 Jags and making them have the same value all the time? much like the Y cable on PWM where you only have to set one motor in the code...
No, unfortunately, that isn't implemented yet. (TI says they might next year)
However, that is a good use of a sync group.

If your intent is to use both on the same transmission, with PID (either in speed mode or position mode), then it gets more complex.
__________________
-- Marshal Horn
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2011, 12:46
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: CAN LabVIEW help

Is this how you would control multiple motors going into a single gearbox? It seems it would be a good way to avoid asyncronous PID loops on the different controllers, which may result in breaking stuff (unless your integral and derivative coefficients are zero, which seems kind of stupid)...

If so, is this all embedded in Robot Drive when started with the CAN Jaguar overload of Drive Open? How does it do all the sync group assignment? I see an Update Sync Group block in Tank Drive.vi, but it somehows picks the 8th sync group (b 10000000, x 80, d 128)... Which it looks like it also feeds to the Set Output blocks, which works, I guess?

Edit: oops, didn't see new posts before posting... Question still stands though, I suppose.
Reply With Quote
  #6   Spotlight this post!  
Unread 06-02-2011, 12:56
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: CAN LabVIEW help

Quote:
Originally Posted by compwiztobe View Post
Is this how you would control multiple motors going into a single gearbox? It seems it would be a good way to avoid asyncronous PID loops on the different controllers, which may result in breaking stuff (unless your integral and derivative coefficients are zero, which seems kind of stupid)...

If so, is this all embedded in Robot Drive when started with the CAN Jaguar overload of Drive Open? How does it do all the sync group assignment? I see an Update Sync Group block in Tank Drive.vi, but it somehows picks the 8th sync group (b 10000000, x 80, d 128)... Which it looks like it also feeds to the Set Output blocks, which works, I guess?

Edit: oops, didn't see new posts before posting... Question still stands though, I suppose.
Yes, the Robot Drive uses sync group #8 (decimal 128).
You'll also notice those "set output" functions happen in PARALLEL, which takes advantage of the space between when the message is sent to the Jaguar, and when the Jaguar sends a response.

Sync group is not something that is "assigned" to the motor (though I suppose this could be done through a modified motor devref). Sync group is sent with each individual message.
__________________
-- Marshal Horn
Reply With Quote
  #7   Spotlight this post!  
Unread 06-02-2011, 13:07
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: CAN LabVIEW help

Quote:
Originally Posted by lior_regev View Post
Well, I'de love a video.
Also, is there a way of talking 2 Jags and making them have the same value all the time? much like the Y cable on PWM where you only have to set one motor in the code...
Here's a video of just that:
__________________
-- Marshal Horn
Reply With Quote
  #8   Spotlight this post!  
Unread 26-02-2011, 06:05
Gary Bonner Gary Bonner is offline
Registered User
FRC #3974
 
Join Date: Jan 2002
Rookie Year: 2000
Location: PA
Posts: 115
Gary Bonner has a spectacular aura aboutGary Bonner has a spectacular aura about
Re: CAN LabVIEW help

Quote:
Originally Posted by kamocat View Post
Yes, the Robot Drive uses sync group #8 (decimal 128).
Are all outputs with the same sync group # updated at the same time, or only those wired to the update sync group vi? Is there a way to tell what sync group #s are being used elsewhere in order to avoid a conflict?

Thanks.
Reply With Quote
  #9   Spotlight this post!  
Unread 26-02-2011, 10:29
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: CAN LabVIEW help

This is the only sync group currently in use, unless you add another yourself.

The sync group is actually a bitmask. Think of it, instead of decimal 128, as binary 1000 0000. (I'm putting a space in the middle to make it easier to read, but I don't think it's standard practice.)

Say you update a motor with a sync group of 1000 0100.
A sync update including the 3rd or the 8th (or both) sync groups will put that update into action.
The same logic works for sync update. If you sync update with the 7th and 6th sync groups (0110 0000), then that will put into action all motor updates that included a sync group of 7 or 8 (or both).

In other words, a motor update with a sync group of 1111 1111 (decimal 255) can be updated by any sync group.
A sync update of 1111 1111 (decimal 255) will update all sync groups.



Some minor details:
  • Updating a motor with a sync group of 0 will force it to update immidiately, without waiting for any sync update
  • The Jaguar does not store a history of previous updates. Sync update can only put into action the last sent motor update.
__________________
-- Marshal Horn
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 20:25.

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