
jarppa79 (Customer) asked a question.
CPU cycle speed, and microsecond delay accuracy.
- What is the default clock speed of the P1AM-100 PLC, and is it possible to change it, change the code cycle times? - What is the latency of the IO-bus signals?
- What is the default clock speed of the P1AM-100 PLC, and is it possible to change it, change the code cycle times? - What is the latency of the IO-bus signals?
I would like to make accurete TTL (24V, transistor output) pulse generator.
- which could be parameterized throught the Ethernet connection.
- so that I could say; "Make 100Hz frequency, and pulse width 100.1us.
- or, 1001Hz frequency, and pulse width 13.5us.
- so, ordinary "microsecond delay", is not enough, but would also like to have the fractions of microsecond. 100ns.. 200ns.. 300ns..
Would this be possible with the P1AM-100 processor, and IO-module attached?
This should be pretty straightforward with the P1-04PWM. Just double check the specs work for you.
There will be some latency on any change to the duty cycle or frequency, but once the values are set, the module will output the pulses without intervention from the P1AM.
I would like not to use normal PWM module, but to make the functionality, in the arduino code, and use normal Output module, with transistor output.
I was thinking to use Timer Interrupt, to make the pulse, which length could be set,
more accurate, not just 0 - 100%, but actual length, by "delay value",
https://youtu.be/m4EpTYaBBJ4
But instead of normal arduino "microsecond delay", would like to have more accurate, to fractions, of 100ns, 200ns, 300ns..
For example, at the arduino code, I could say; make output pulse delay of 10.5us, or 32.7us.. or what ever, from 1Hz, to 100Hz frequencies.
I don't think the backplane latency would allow for the precision you are looking for. You would have to make you're own circuit using the GPIO pins. The P1AM-PROTO would make assembly of something like this easier. Using a library like this will make it easier to configure your pulses since it allows the SAMD21 peripherals generate the pulses rather than worrying about manually changing levels via an interrupt and timer.