PDA

View Full Version : how to use a variable for pulsout command



longpole001
- 27th March 2012, 10:19
Hi guys , is there away to use a variable for the pulsout command , or a way around the same

eg

time var word

one con 1000

time = one

pulsout GPIO.0,time

regards

sheldon

Acetronics2
- 27th March 2012, 15:49
Hi, Sheldon

That's exactly what you do here ...

1) you first set a constant to 1000
2) you set a variable equal to this constant
3) you output signal of the variable length ...

so, step 1) is not necessary ...


writing




Time VAR Word ; create your variable

Time = 1000 ; set it to 1000

PULSOUT pin, Time ; output your signal



is the shortest way ... using a variable.

Alain

longpole001
- 29th March 2012, 03:13
cheers for that