View Single Post
  #2   Spotlight this post!  
Unread 23-06-2002, 23:59
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
OFF, FULL FORWARD, FULL REVERSE...

Posted by Joe Johnson at 2/1/2001 7:57 PM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: Programming The Victor
Posted by Michael Bloomfield on 2/1/2001 6:23 PM EST:



My understanding is that there is a 10% dead band (which I hate by the way - this really makes feedback loops much more difficult to implement) around 127.

So...
OFF = 114 -> 140

According to the Default Code, 216 or higher is full forward and 56 or lower is full reverse (Using the Default Calibration -- which is HIGHLY recommended, imho).

So...
FULL REVERSE = 0 -> 56
FULL FORWARD = 216 -> 254

Note that the full forward does not include 255. This is sort of important. I think the code will work most of the time, in that the Victors get the idea that you are commanding full forward. BUT... you should never send 255 as the message to the PWM's This is done in the SERIALOUT command that is the last line of the default code prior to "Goto MainLoop".

Why?

Because two "255"s in a row is the message that the Master CPU uses to know that the STAMP2 is starting a new message. If your message contains this string, the master CPU can get confused about what it is the STAMP2 is sending it. You can normally get away with a single 255 but if start sending 2 of them in a row, you are asking for trouble.

Bottom line: Don't set PWM outputs to a value higher than 254 and you won't get into any trouble.

Joe J.

P.S. Below is a copy and paste from the bottom of the default code FYI:
.
.
.
'========== OUTPUT DATA ================================================== ====
'================================================= ============================
' The Serout line sends data to the Output uP. The Output uP passes this to each PWM 1-16
' and Relay 1-8. The Output uP will not output data if there is no communication with the
' Operator Interface or if the Competition Mode is Disabled. Do not delete any elements
' from the Serout array. Set unused PWM outputs to 127. Set unused relay outputs to 0.
'
' Serout USERCPU, OUTBAUD, [255,255,(PWM1),relayA,(PWM2),relayB,(PWM3),(PWM4), (PWM5),(PWM6),(PWM7),(PWM8),(PWM9),(PWM10),(PWM11) ,(PWM12),(PWM13),(PWM14),(PWM15),(PWM16)]

Serout USERCPU, OUTBAUD, [255,255,p1_y,relayA,p2_y,relayB,p3_y,p4_y,p1_x,p2_ x,p3_x,p4_x,p1_wheel,p2_wheel,p3_wheel,p4_wheel,12 7,127,127,127]

Goto MainLoop:


Stop
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.