@Martin-Kudláček Thank you, that clears it up.
Latest posts made by mkb
-
RE: Analog Input: difference between AIS and AI?
-
Analog Input: difference between AIS and AI?
UniPi neuron L513, and I'm using Mervis for programming. Group 2 and 3 analog inputs have three pins each. Eg for 2.1 you have: AIS2.1, AI2.1, and AGND. I can't find information anywhere about what this AIS pin is. Does anyone know?
-
RE: digital output voltage
@Martin-Kudláček Thanks a ton for all your help with this. I'll send you an email about the firmware update.
-
RE: digital output voltage
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?
-
RE: digital output voltage
@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.
-
RE: digital output voltage
@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.
-
RE: digital output voltage
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.
-
RE: digital output voltage
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?
-
RE: digital output voltage
Quick update, I have learned some stuff but not enough to get it working.
Learnings:
- Software PWM (that Mervis B87 fbd block) only works for low frequencies, eg 0.1Hz or less.
- Hardware PWM is different, this is what is addressed in the Advanced mode of digital outputs: PWM tutorial.
- The digital outputs (which double as digital PWM outputs) are NPN, check out this Neuron 12V digital input forum thread for some info on that.
My setup:
To achieve PWM at a frequency of 20kHz, with a resolution of 101 steps, I have set my pwm_cycle to 99, and pwm prescale to 23. I wired up my circuit with a pull up resistor to an external 12V power supply, like this.I was expecting that when the DO pwm is 0% (high impedence) the voltage at P would be 12V, and that when the DO pwm is 100% (shorted to ground) the voltage at P would be 0V. In reality, the voltage at P is always 12V.
What am I missing? It seems like setting the DO pwm value doesn't do anything at all.