digital output voltage
-
Hi @mkb,
the picture is probably worth a thousand words: -
Hey @Martin-Kudláček ,
I'm trying to control a motor driver that has three pins:
- DIR (direction) input (10V or 0V),
- PWM (12V or 0V pwm), and
- Ground.
I can't imagine applying pwm switching at the ground will be good for the DIR input, which is why I tried using the pullup resistor as per the image in my previous post.
Is there any other way I can wire this to achieve pwm at the PWM input but not at the DIR input?
-
When I toggle the DO pwm from 0% to 100%, the DO led turns on and off, which makes me think it's working. When I measure resistance between that DO pin and ground though, my ammeter reports infinite resistance for both 0% and 100%.
Is it possible that the DO pwm is broken somehow? I can't see why my wiring schematic wouldn't work otherwise.
-
Hi @mkb, in your schematic, you don't have the DOGND tied to the GND of the 12V PSU. Please start with that.
-
@Martin-Kudláček Ah I left that out of the schematic, but in my setup all of the grounds are common. The power supply ground is indeed connected to the UniPi ground and also the DOGND.
-
@Martin-Kudláček I've set the pwm cycle to 9999 and prescale to 9599 so that I now have a resolution of 10001 steps at a frequency of 0.5Hz (period of 1s).
In debugging mode, I've set the PLC value of the PWM pin to 50% (ie 5000).
The voltage is staying stubbornly at 12V.
-
-
More info: all of the DOs work in digital out setting. It's only PMW mode that doesn't seem to be working.
@Martin-Kudláček This is an old PLC, I'm not sure how old but the serial number is #37, so we probably bought it in the first year you started selling Neuron L513s. Just before starting this project I updated the OS to 2.3.0.10, and I am using the corresponding Mervis IDE. Could this be a compatibility issue of some sort?
-
Hi @mkb,
I have replicated the configuration (cycle 9999, prescaler 9599, that means resolution 0-10000 with frequency 0.5hz). I put the value 5000 (the 50% for the given resolution) to the PWM variable and was able to read a voltage change across DO1.1 and DOGND with a multimeter. The values changed in 1s interval, which they should with given frequency and duty cycle.The last piece of SW is called a firmware (FW), which is flashed in the IO boards. Each of the group (you have 3 on the L513) has its own microcontroller running its own firmware. This needs to be up-to-date as well. I looked in our stock system and it shows that your PLC has been shipped with FW 5.5, which is very old.
The firmware cannot be updated via Mervis IDE, but only via SSH connection to the PLC. Please, let's continue via [email protected].
Thanks,
Martin -
@Martin-Kudláček Thanks a ton for all your help with this. I'll send you an email about the firmware update.
-
The problem has been solved by flashing the latest firmware.