To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 15430
15429  |  15431
Subject: 
Re: Op-code question
Newsgroups: 
lugnet.robotics
Date: 
Sat, 12 May 2001 14:22:15 GMT
Viewed: 
745 times
  
In article <002301c0dad9$55be30e0$b3d0adcb@ferrari.com>, "Evan Woo"
<evanwoo@ihug.co.nz> wrote:

Hi,
With regard to the op-code
(http://graphics.stanford.edu/~kekoa/rcx/opcodes.html) for set motor
power (13/1b), there are three parameters:

byte motors: Bit field to specify up to three motors
byte source: Source type for power level. Only 0, 2, and 4 allowed
byte argument: Argument for power level

Can someone explain to me what is the parameter "source"? What are the
values 0, 2 and 4 for? It seems it only works properly when I pass the
value 2.

There are lots of different data sources in the rcx...

0 - variables
1 - timers
2 - constants
4 - random numbers

etc.

A lot of opcodes have arguments that are coded as source/value pairs.
In this case, if you want to specify the argument as a constant value,
you'd use source 2.  If you wanted the opcode to read a variable, then
use source 0 and put the variable number in the instruction.

When using the 1.0 firmware, there are lots of limitations on the valid
sources for specific opcodes.  The 2.0 firmware is a lot less
restrictive.

Dave

--
reply to: dbaum at enteract dot com



Message is in Reply To:
  Op-code question
 
Hi, With regard to the op-code ((URL) for set motor power (13/1b), there are three parameters: byte motors: Bit field to specify up to three motors byte source: Source type for power level. Only 0, 2, and 4 allowed byte argument: Argument for power (...) (24 years ago, 12-May-01, to lugnet.robotics)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Contact Recovery Nerd for Speedy USDT / BTC Recovery
23 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR