Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically How to generate the Pulse output

Hey Friends,,

 

 

I want to generate the Pulse using one digital out channel . I want to switch on and off for every 10ms for 5000 times.

 

can any one explain me with 1 example program ..... 

0 Kudos
Message 1 of 4
(5,039 Views)

hi

 

please specify the device that you are using to generate the pulse ouput using digital output. Because not all devices support correlated digital I/O.

 

but you can do this very easily if you use counter output instead of digital output in any device. I've attached the example code.

 

 

thanks

Ravi.

 

 

pulse generation.jpg

0 Kudos
Message 2 of 4
(5,027 Views)

Hii Ravi Actually i am having limited counter o/p module ... ya i know how to use the Counter module..

 

Actually i want to drive a stepper motor through a single digital output by switching on and off continously for every 10 ms on and off... for about 5000 pulse... so inorder to use a digital signal how can i access it... can u suggest an idea for that.......

 

Regards

karthik.. 

0 Kudos
Message 3 of 4
(5,009 Views)

Hi

 

Check out this code. I'm using software timing to control the on time and off time 🙂 and the counter will check if you have exceeded 5000ms. The code will stop after that time.

motor.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This will generate a PWM. But I'm skeptical if it will run the motor.

That is because the current output of the Digital Output is very less (mA). If you have a motor drive then it is not a problem.

 

regards

Ravi.

0 Kudos
Message 4 of 4
(5,006 Views)