benauger9
Hello!
 
I am using OPENPLC editor V4 to program an Arduino nano esp32, for the final project of my associates degree! The Arduino mounts on a custom PCB, and acts as a PLC with isolated inputs/outputs, but also has a high power MOSFET for controlling an electric motor.
 
I am somewhat new to ladder logic programming but I understand the basics. I have created a function block that will create a PWM signal to power the motor via an analog pin on my board. I have the block set up so separate contacts will set the signal to different duty cycles. however the editor will not allow me to drag contactors to the other two inputs of my function block. Am I doing something wrong? I may have not set the block up correctly, this is a first for me.
 
Thanks!
 
[203128%2F9742430%2Fmceclip0]
Reply 0 0
thiagoralves
You can only build logic on the top line. The other inputs and outputs can only be connected to variables
Reply 0 0
benauger9
What would be the best way to implement this? If I used contactors tied to internal variables on other rungs, then just typing the name of that internal variable to the other lines?
thanks!
Reply 0 0
thiagoralves
Yes, that’s correct. Implement the logic you need separately, then assign a variable to it and place that variable on the block input/output
Reply 0 0
Reply