reinaldogift
Hey!
I'm using an Arduino Uno to compile an openplc  project. The project is as follows: I have a variable resistor, a push button and a motor connected to my arduino. If I push the start push button(BOOL) AND have a variable resistor(INT) connected then I will move motor(INT). I initially did not have the push button, and just connected my variable resistor(INT) to the motor(INT) in open plc editor. That worked. I added the push button, now i'm lost how it operates. Please help. I've attached my photo of the system . How do I combine analog and digital? Can I put it in between the two power rails so it will be ladder logic? ThanksScreenshot (56).png
Reply 0 0
thiagoralves
It is not wise to attach two analog variables together in ladder logic. Usually, when you want to transfer the value of one analog variable to the other, we use the MOVE block. And that's how you should do it. Add the MOVE block to your diagram and make sure to select "Execution Control" on the dialog box:
Capture.png 
The "Execution Control" will enable the EN and ENO pins on the MOVE block. These pins control if the block should be executed or not. Then, wire the VAR_RESISTOR1 to pin IN, MOTOR to pin OUT, and START to pin EN. Close the circuit connecting ENO to a power rail. This should work.
Reply 0 0
Laila Ana
Hello, can we use 6 pins toggle switch on openplc?
Reply 0 0
Laila Ana
It is not wise to attach two analog variables together in ladder logic. Usually, when you want to transfer the value of one analog variable to the other, we use the MOVE block. And that's how you should do it. Add the MOVE block to your diagram and make sure to select "Execution Control" on the dialog box:
Capture.png 
The "Execution Control" will enable the EN and ENO pins on the MOVE block. These pins control if the block should be executed or not. Then, wire the VAR_RESISTOR1 to pin IN, MOTOR to pin OUT, and START to pin EN. Close the circuit connecting ENO to a power rail. This should work.


In my case, do I use the MOVE block also? if yes, may I know how should I connect them?
 
Reply 0 0
Laila Ana
Laila Ana wrote:


In my case, do I use the MOVE block also? if yes, may I know how should I connect them?
 


btw my step 1 is BOOL
Reply 0 0
thiagoralves
Laila Ana wrote:
Hello, can we use 6 pins toggle switch on openplc?

Yes
Reply 0 0
thiagoralves
Laila Ana wrote:


In my case, do I use the MOVE block also? if yes, may I know how should I connect them?
 

I don’t know what is your case
Reply 0 0
Laila Ana

I don’t know what is your case


How do I combine my digital input (Automatic push button) with my analog input (Light Sensor) to generate digital output (step 1) , do I use the MOVE block as well as previously told? if yes, may I know how should I connect them? Because I got that red wire meaning something is wrong right? If not the MOVE block, then which block should I use?
Reply 0 0
Reply