about executing pause command time
Archiver
Posts: 46,084
i'm currently doing a pneumatic project which concern about
controlling the air cylinder using output pause command .
part of my program is like this :
HIGH 2
PAUSE 10
HIGH 3
PAUSE 10
LOW 2
PAUSE 10
will it execute high 2 for 10ms after that execute the high3 for
10ms .or execute both high output at the same time ?
if it is executing the both high output at separate time(i mean one
by one) ,how am i going to let them do the command at the same time
with different time delay?
and if it is executing at the same time ,how can i let them executing
the command one by one ?
thanks for the help .
controlling the air cylinder using output pause command .
part of my program is like this :
HIGH 2
PAUSE 10
HIGH 3
PAUSE 10
LOW 2
PAUSE 10
will it execute high 2 for 10ms after that execute the high3 for
10ms .or execute both high output at the same time ?
if it is executing the both high output at separate time(i mean one
by one) ,how am i going to let them do the command at the same time
with different time delay?
and if it is executing at the same time ,how can i let them executing
the command one by one ?
thanks for the help .
Comments
2 will go high and after 10ms, 3 will go high. Since you have not
changed the state of 2, it will continue to be high.
After another 10ms, 2 will go low. Since you have not changed the state
of 3, it will remain high.
So, in the first 20ms, 2 was high for the entire 20 ms and 3 for the
last 10ms. 3 then remained high for another 10ms (2 was still low) and
3 is still high
If you want 2 high for 10ms, then 2 off and 3 high for 10 ms then 3 off,
try
HIGH 2
PAUSE 10
Low 2
HIGH 3
PAUSE 10
LOW 3
Just remember they don't change states until you tell them to with a
specific command. Then you can use pause commands to break your timing
into whatever intervals you want between state changes.
Original Message
From: kaijiun83 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=2F70a3fhNXfwWzXCvUHjvFCe0c3LslZX-Hoy7AhEEourVEZYrhdc9y5H4kdDh52i3BHIEWoBORjo]kaijiun83@y...[/url
Sent: Saturday, June 21, 2003 11:23 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] about executing pause command time
i'm currently doing a pneumatic project which concern about
controlling the air cylinder using output pause command .
part of my program is like this :
HIGH 2
PAUSE 10
HIGH 3
PAUSE 10
LOW 2
PAUSE 10
will it execute high 2 for 10ms after that execute the high3 for
10ms .or execute both high output at the same time ?
if it is executing the both high output at separate time(i mean one
by one) ,how am i going to let them do the command at the same time
with different time delay?
and if it is executing at the same time ,how can i let them executing
the command one by one ?
thanks for the help .
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
outA=%0100 ' primes p0,p1 & p3 to output low level, p2 high
dirA=%1100 ' p2, p3 become outputs (as primed in previous command)
' note that all BS2 pins are inputs by default upon reset
' p0 & p1 are still inputs after this command
pause 10
outA=%1100 ' now both p3 & p2 are high
pause 10
outA=%1000 ' now only P3 is high
pause 10
-- Tracy
>i'm currently doing a pneumatic project which concern about
>controlling the air cylinder using output pause command .
>
>
>part of my program is like this :
>HIGH 2
>PAUSE 10
>HIGH 3
>PAUSE 10
>LOW 2
>PAUSE 10
>
>
>will it execute high 2 for 10ms after that execute the high3 for
>10ms .or execute both high output at the same time ?
>
>if it is executing the both high output at separate time(i mean one
>by one) ,how am i going to let them do the command at the same time
>with different time delay?
>
>and if it is executing at the same time ,how can i let them executing
>the command one by one ?
>
>thanks for the help .
" outA=%0100"
is the A just a variable which i can put other letter or word to it ?
and if i want to declare more pin ,can i just put outA=%111000 for 6 pins?
thanks .
Tracy Allen <tracy@e...> wrote:
The most flexible way to set multiple outputs at once is something like this:
outA=%0100 ' primes p0,p1 & p3 to output low level, p2 high
dirA=%1100 ' p2, p3 become outputs (as primed in previous command)
' note that all BS2 pins are inputs by default upon reset
' p0 & p1 are still inputs after this command
pause 10
outA=%1100 ' now both p3 & p2 are high
pause 10
outA=%1000 ' now only P3 is high
pause 10
-- Tracy
>i'm currently doing a pneumatic project which concern about
>controlling the air cylinder using output pause command .
>
>
>part of my program is like this :
>HIGH 2
>PAUSE 10
>HIGH 3
>PAUSE 10
>LOW 2
>PAUSE 10
>
>
>will it execute high 2 for 10ms after that execute the high3 for
>10ms .or execute both high output at the same time ?
>
>if it is executing the both high output at separate time(i mean one
>by one) ,how am i going to let them do the command at the same time
>with different time delay?
>
>and if it is executing at the same time ,how can i let them executing
>the command one by one ?
>
>thanks for the help .
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and Body of
the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
[noparse][[/noparse]Non-text portions of this message have been removed]
(consult the manual for details). The 16 outputs of the stamp can
be accessed in trunks of 8 bits: outL, outH, 4 bits: outA, outB ...
outD, or single bits out0 ... out15.
If you want to set 6 bits at a time (without affecting the other
bits) you have to use outL (or outH resp.) and mask off the 6 bits
you want to use.
outL = yourValue or (inL and %11000000)
provided the higher 2 bits of yourValue are 0
or more general
outL = (your_6_bits and %00111111) or (inL and %11000000)
Regards
Adrian
kaijiun83@y... writes:
> Thanks for helping ,but the command you give
> " outA=%0100"
>
> is the A just a variable which i can put other letter or word to it ?
> and if i want to declare more pin ,can i just put outA=%111000 for 6 pins?
>
> thanks .
NO,,,,
OutA refers to pins 0 through 3,
OUTB is pins 3 through 7
OUTC is pins 8 through 11
OUTD is pins 12 through 15
OUTL is pins 0 through 7
OUTH is pins 8 through 15
You can use OUTL to address pins 0 through 5., If you already know the state
of pins 6 & 7 you can keep those the same (0 or 1) when you address OUTL..
example iif pins 0 through 7 are all low, you want to change 0 through 5
without changing 6 & 7
use....OUTL = %00111111
[noparse][[/noparse]Non-text portions of this message have been removed]
variables: outs, outL and outH, and outA to outD, and out0 to out15.
They reflect or determine the state of the pins when they are outputs.
Also, it is important to know that there are the corresponding
variables dirs, dirL and dirH, and dirA to dirD, and dir0 to dir15.
Those determine whether a pin is input or output. To make a pin a
low output you have to set both its direction bit=1 and its output
bit to the desired state.
out0=0 ' prime p0 to be a low output, but it is not yet!
dir0=1 ' it now becomes a low output
Other commands like TOGGLE 0, or HIGH 0, or INPUT 0, will change the
bits in the OUTS and DIRS registers. For example, the TOGGLE 0
command will flip the state of the bit in the OUTS register and it
will also set the bit in the DIRS register to 1, forcing it to be an
output.
There are also the input commands that use the same syntax: ins, inL
and inH, inA to inD, and in0 to in15.
-- Tracy
>Thanks for helping ,but the command you give
>" outA=%0100"
>
>is the A just a variable which i can put other letter or word to it ?
>and if i want to declare more pin ,can i just put outA=%111000 for 6 pins?
>
>thanks .
>
>Tracy Allen <tracy@e...> wrote:
>The most flexible way to set multiple outputs at once is something like this:
>
>outA=%0100 ' primes p0,p1 & p3 to output low level, p2 high
>dirA=%1100 ' p2, p3 become outputs (as primed in previous command)
>' note that all BS2 pins are inputs by default upon reset
>' p0 & p1 are still inputs after this command
>pause 10
>
>outA=%1100 ' now both p3 & p2 are high
>pause 10
>outA=%1000 ' now only P3 is high
>pause 10
>
>
>
>-- Tracy
>
>
>>i'm currently doing a pneumatic project which concern about
>>controlling the air cylinder using output pause command .
>>
>>
>>part of my program is like this :
>>HIGH 2
>>PAUSE 10
>>HIGH 3
>>PAUSE 10
>>LOW 2
>>PAUSE 10
>>
>>
>>will it execute high 2 for 10ms after that execute the high3 for
>>10ms .or execute both high output at the same time ?
>>
>>if it is executing the both high output at separate time(i mean one
>>by one) ,how am i going to let them do the command at the same time
>>with different time delay?
>>
>>and if it is executing at the same time ,how can i let them executing
>>the command one by one ?
>>
>>thanks for the help .
>
>
>To UNSUBSCRIBE, just send mail to:
>basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject
>and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>
>[noparse][[/noparse]Non-text portions of this message have been removed]
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/