VADCFLL-L Archives

First Lego League in Virginia and DC

VADCFLL-L@LISTSERV.JMU.EDU

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Blanpied <[log in to unmask]>
Reply To:
Michael Blanpied <[log in to unmask]>
Date:
Mon, 23 Nov 2009 10:43:15 -0500
Content-Type:
multipart/alternative
Parts/Attachments:
text/plain (3080 bytes) , text/html (4 kB)
Jin,

I am not an expert programmer so this solution may be clunky. I also 
do not have a robot with which to test the solution. But here's one 
approach:

You can use a LOGIC data wire to send information from the top 
(B-motor) beam of the program to the lower (AC-move) beam.


Top beam:
1. Use a Variable block to write variable Logic1 to FALSE.
2. Motor block starts motor B turning 16 rotations; wait for completion.
3. Use a Variable block to write Logic1 to TRUE.
4. Use a Variable block to read Logic1; connect wire to Loop (below).

Bottom beam:
1. Move block starts motors A and C turning indefinitely.
2. Empty Loop with Control set to Logic "until True". Connect data 
wire from top branch to this data plug.
3. Move block stops motors A and C.


If this works as intended, then the A and C motors will turn 
indefinitely so long as the program is stuck in the empty loop. When 
the B motor completes its 16 rotations, Logic1 becomes TRUE, 
triggering the program to exit the loop and then stop motors A and C.

I can send a screenshot of my test program if you're interested. I'd 
be interested in anyone's ideas on how to do this more efficiently.

(Note:  At least on the Mac, bugs in the NXT v1.1 interface make it a 
royal pain in the tush to work with multiple sequence beams. It is 
easy to end up with little bits of errant beam or bits of wire 
floating around on the screen. It's also easy to have blocks appear 
to be on the beam but actually not. I don't know if these issues 
plague PC users, and if they persist in NXT v2.0.)

Cheers,
Mike


>I have a NXT-G programming problem that I cannot figure out. I 
>decide to post the problem.
>
>
>
>I connected the three NXT block output ports A/B/C with three motors 
>respectively. What I have done is -
>
>
>
>1 - Use a MOVE block to control Motor A and C; put motor B on a 
>MOTOR block, and running the two blocks simultaneously. The purpose 
>of doing so is while all three motors are running at the same time, 
>I can have the option to set the power level on A and C differently 
>from B's. I successfully programmed that using "branch-out" sequence 
>beam as Charlie described in an early email.
>
>
>
>2 - I know when I want B to stop: after 16 rotations. I want A and C 
>to stop when B stops. The duration values (time, degree or rotation) 
>on MOVE block for A and C cannot provide an satisfactory result.
>
>
>
>Here is my challenge: I wonder the data wire may give me what I 
>need, but I don't know much about it. I have read the online help 
>and I'm still clueless - all wiring I tried got grayed out :-((
>
>
>
>Any suggestions are really appreciated!
>
>
>
>Jin
>
>
>To UNSUBSCRIBE or CHANGE your settings, please visit 
><https://listserv.jmu.edu/archives/vadcfll-championship-l.html> 
>https://listserv.jmu.edu/archives/vadcfll-championship-l.html and 
>select "Join or leave the list".

-- To UNSUBSCRIBE or CHANGE your settings, please visit https://listserv.jmu.edu/archives/vadcfll-l.html and select "Join or leave the list".

-- VADCFLL administrative announcements are sent via VADCFLL-ADMIN-L. Visit https://listserv.jmu.edu/archives/vadcfll-admin-l.html to subscribe.








ATOM RSS1 RSS2