| | Spirit.OCX & Starting a Program
|
|
If I want to start a program using spirt.ocx do I use StartTask (number) ? I've been trying to use this with no luck. And would appreciate some help with this. (26 years ago, 15-Nov-98, to lugnet.robotics)
|
|
| | Re: Spirit.OCX & Starting a Program
|
|
I don't use spirit.ocx - I work directly with the bytecodes, but I think this info is true for spirit.ocx as well... The number in StartTask(number) refers to a task within a program (each program can have multiple tasks). Typically, you would use (...) (26 years ago, 15-Nov-98, to lugnet.robotics)
|
|
| | Re: Spirit.OCX & Starting a Program
|
|
(...) Is it possible to do this from within a running program? What I read implied to me that the SelectProgram() would stop the current program so it wouldn't be running to issue the StartTask(). It would sure be nice to have a movement program (...) (26 years ago, 16-Nov-98, to lugnet.robotics)
|
|
| | Re: Spirit.OCX & Starting a Program
|
|
(...) As far as I know, you can't set and start a different program from within another program. Execution stops when you switch programs, so the following start task instruction will never get reached. Maybe Dave meant that you can switch programs (...) (26 years ago, 16-Nov-98, to lugnet.robotics)
|
|
| | Re: Spirit.OCX & Starting a Program
|
|
(...) Yep, that's exactly what I meant. Dave (26 years ago, 16-Nov-98, to lugnet.robotics)
|
|
| | Re: Spirit.OCX & Starting a Program
|
|
(...) Doesn't the mysterious opcode d2 allow you to do that? Or am I missing something? }}Date: Sun, 25 Oct 1998 15:35:08 -0800 (PST) }}From: Kekoa Proudfoot <kekoa@Graphics.Stanford.EDU> }}To: Lego Robotics <lego-robotics@crynwr.com> }}Subject: Re: (...) (26 years ago, 16-Nov-98, to lugnet.robotics)
|
|
| | Re: Spirit.OCX & Starting a Program
|
|
(...) It does seem to have the correct behavior for both setting and starting a program. My earlier description of the d2 opcode was a bit brief. Reviewing my notes, the "stop all tasks, set current program, run program" pseudocode is really: stop (...) (26 years ago, 16-Nov-98, to lugnet.robotics)
|