Go to Post the jocks may have muscle, but we have extruded aluminum :D - [527]phil [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2000
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-06-2002, 22:46
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
programming help: part deux

Posted by Jon.

Engineer on team #190, Gompei, from Mass Academy of Math and Science and Worcester Polytechnic Institute.

Posted on 1/23/2000 1:44 AM MST



Does anyone know of a way to read only 1 input instead of all of them at once?
i need to sample a sensor a lot and don't care for the rest...
thanks,
jon 190


__________________
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.
  #2   Spotlight this post!  
Unread 23-06-2002, 22:46
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
Re: programming help: part deux

Posted by Rick Berube.

Engineer on team #121, Rhode Warriors, from Middletown H.S..

Posted on 1/23/2000 9:03 AM MST


In Reply to: programming help: part deux posted by Jon on 1/23/2000 1:44 AM MST:



: Does anyone know of a way to read only 1 input instead of all of them at once?
: i need to sample a sensor a lot and don't care for the rest...
: thanks,
: jon 190

Jon,
I don't think you can read just a bit. The data you want is only accessible to your PBasic program via the SERIN statement. The Master CPU is the one that has access to that data. It reads all the sensor data on the RC and then serializes the data to the Stamp IISX. An interesting experiment however, would be to see how fast the Master CPU can update the data. We know that the interface supports at least a 40 Hz update rate based on the specifications. Can it go faster? Perhaps, but you may also read stale data (that is, the Master CPU may update that data at a lesser periodic rate than you are polling at).

You can certainly minimize the time for the SERIN statement by not reading as many bytes. According to my calculations, theorectically it takes ~160 uS to receive each byte (@ 62500 baud). Keep in mind however, that this one SERIN statement also brings in all your playerstation data, so there will be practical liimitations to what you can remove from the data stream. Also, I believe once the initialization section of code runs, the format of the data stream is etched in stone until the next reset of the RC.

Perhaps a call to Innovation First is on order ot answer this question.

Regards,

Rick



__________________
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.
  #3   Spotlight this post!  
Unread 23-06-2002, 22:46
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
Re: programming help: part deux

Posted by Eric Rasmussen.

Engineer from FIRST.

Posted on 1/23/2000 10:18 PM MST


In Reply to: Re: programming help: part deux posted by Rick Berube on 1/23/2000 9:03 AM MST:



: Also, I believe once the initialization section of code runs, the format of the data stream is etched in stone until the next reset of the RC.

You could always use the 'robot reset' button to remotely reset the PBASIC part, and that would cause the negotiation to happen again. However, that's pretty ugly because: A) the driver would have to hit the button, and B) you would have to 'remember' what you wanted to renegotiate with either a sensor input or in the EEPROM, because the PBASIC RAM would be cleared when the processor was reset. (Everyone tells me, 'Eric, EEPROMS have improved in recent years so now you get millions of write cycles', but I still don't believe they will last long if you write to the same address at 40 hz.)

-Eric

__________________
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.
  #4   Spotlight this post!  
Unread 23-06-2002, 22:46
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
Analog or Digital?

Posted by Nate Smith.

Other on team #66, GM Powertrain/Ypsilanti HS/Willow Run HS, from Eastern Michigan University and GM Powertrain.

Posted on 1/23/2000 11:31 AM MST


In Reply to: programming help: part deux posted by Jon on 1/23/2000 1:44 AM MST:



Jon,
You do only have one SERIN command to get all of your data from the RC's main processor...but if it's an analog input (sensor1-7 in the default control program), you can set the value in the DEFINE CONSTANTS FOR INITIALIZATION section of the control program for the one that you want to 1, and the rest to 0. However, if it's a digital input(limit switch, etc.) that you want to read, you have to take the entire byte that the switch's bit is stored in. Hope this helps...

Nate
__________________
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.
  #5   Spotlight this post!  
Unread 23-06-2002, 22:46
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
About that SERIN command

Posted by Tony K.

Student on team #292, PantherTech, from Western High School and DaimlerChrysler.

Posted on 1/23/2000 2:14 PM MST


In Reply to: Analog or Digital? posted by Nate Smith on 1/23/2000 11:31 AM MST:



This SERIN thing has been tricky. Last year (as I found out...) you should NEVER modify the SERIN command. But this year it looks like you can add or subtract to it?!? Could you fill me in on this? Thanks!

TonyK
__________________
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.
  #6   Spotlight this post!  
Unread 23-06-2002, 22:46
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
Re: About that SERIN command

Posted by Nate Smith.

Other on team #66, GM Powertrain/Ypsilanti HS/Willow Run HS, from Eastern Michigan University and GM Powertrain.

Posted on 1/23/2000 4:03 PM MST


In Reply to: About that SERIN command posted by Tony K on 1/23/2000 2:14 PM MST:



: This SERIN thing has been tricky. Last year (as I found out...) you should NEVER modify the SERIN command. But this year it looks like you can add or subtract to it?!? Could you fill me in on this? Thanks!

: TonyK

This year's SERIN can be modified to a point...the only restriction is that you can't have more than 26 variables in it...and they have to be in a particular order, as outlined in the comments just before it. The DEFINE CONSTANTS FOR INITIALIZATION and PBASIC - MASTER uP INITIALIZATION ROUTINE are used to tell the master uP which of the 32 available pieces of data you want it to send back in the SERIN...

Nate

__________________
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.
  #7   Spotlight this post!  
Unread 23-06-2002, 22:46
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
thanks to all for the help - eom-

Posted by Jon.

Engineer on team #190, Gompei, from Mass Academy of Math and Science and Worcester Polytechnic Institute.

Posted on 1/24/2000 4:14 PM MST


In Reply to: programming help: part deux posted by Jon on 1/23/2000 1:44 AM MST:



thanks to all for the help - eom-


__________________
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.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Compatition Angela06 Programming 30 08-04-2005 23:12
Can I reduce the number of similar part files? roknjohn Inventor 2 29-01-2003 21:36
Pneumatics electrical wiring and programming archiver 2001 1 23-06-2002 23:10
Controller Programming Joelster Programming 9 11-02-2002 22:04
pbasic programming punarhero Programming 4 21-01-2002 23:32


All times are GMT -5. The time now is 03:32.

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