Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Relay on off

(you are viewing a thread; or go back to list of threads)

Relay on off (by Amod Pathak)
Hi,
Please guide me to make relay (y1) to on with x1 and off with x2.
Sun Apr 21 2019, 04:34:52
Amod Pathak (by Calubert)
te adjunto un programa. Calubert Paulino
Sun Apr 21 2019, 06:51:16, download attachment Amod Pathak.ld
(no subject) (by Zoran)
Try like this this is with NO contacts
Sun Apr 21 2019, 06:52:40, download attachment Relay.ld
(no subject) (by MGP)
Attached your program, pushbutton X1 = on and X2 = off.
Sun Apr 21 2019, 06:54:50, download attachment ON_OFF.ld
(no subject) (by MGP)
2 programs posted at the same time, great ;)
Sun Apr 21 2019, 06:56:27
(no subject) (by Calubert)
(por Amod Pathak).Has visto tres programa diferentes que hacen lo mismo, por ello debes mirar el manual de LDMicro en la pestaña de ayuda.
Sun Apr 21 2019, 07:00:05
(no subject) (by Calubert)
Los tres programas hacen lo mismo, pero según el programa que se escoja, Amod Pathak.ld este ocupa de memoria 3%. Relay.ld 5%
.ON_OFF.ld 4%. Probado con PIC16F628 en Hex.
esto no quiere decir que no estén bien hechos, es para entender y saber que cuanto mas simple se haga menos memoria ocupa en el micro-controlador.
Sun Apr 21 2019, 07:30:34
(no subject) (by Amod Pathak)
MGP,
It's not working.rest all file doesn't open in ldmicro.
Sun Apr 21 2019, 13:32:11
(no subject) (by Amod Pathak)
hi,

please check my program i want to turn off COMPRESSOR when THERMOSTATNC is high
Sun Apr 21 2019, 13:50:13, download attachment gajananbhoj.ld
(no subject) (by MGP)
I can't figure out how your program must work and using Ycirvalve in two different places confuse me.

The reason why you cannot open all programs is probably because you are using an old version of LDmicro.
Download version 5.3.0.4
Sun Apr 21 2019, 17:30:02
(no subject) (by Amod Pathak)
MGP,

Please check why this is working,yours did not work.
Mon Apr 22 2019, 10:56:34, download attachment ON_OFF.ld
(no subject) (by MGP)
This is because portB has pullup resistors, in your program one contact is connected to the Bport and de other to the Dport.
Tue Apr 23 2019, 03:42:32
(no subject) (by Amod Pathak)
MGP,
What should I do now.
Tue Apr 23 2019, 05:20:09
(no subject) (by MGP)
Do you have a schematic of your buttons how they are connected to de controller?
Tue Apr 23 2019, 05:59:46
(no subject) (by Amod Pathak)
MGP,

Please find pcb layout.this is component side.
Tue Apr 23 2019, 06:33:24, download attachment plc self.jpg
Modificado (by Calubert)
(por Amod Pathak). Hola no se muy bien lo que quieres hacer, ya que veo que usas las patillas de salida directas, creo que deberías hacer reles internos y una vez halla echo todas las variables que le den la orden a las patillas de salida (Puertos).
yo solo te he colocado un Reset y un Franco alto, esto lo que hace es que cuando el temporizador da la orden activa el compresor y hasta que el termostato no llegue a su temperatura hará el Reset al compresor, ten en cuenta que nunca arrancar el compresor si el termostato esta fuera de rango o temperatura ajustada.
Tue Apr 23 2019, 06:36:23, download attachment gajananbhoj.ld
(no subject) (by Amod Pathak)
MGP,
Switch is connected as image attached.
Tue Apr 23 2019, 06:38:10, download attachment images (1).png
(no subject) (by MGP)
Then you have to invert all inputs because they are ON at rest.
In the simulator tag the "HI input", then you can simulate it as in real live ;)
Tue Apr 23 2019, 06:49:24, download attachment onoffv2.jpg
(no subject) (by Amod Pathak)
MGP,
Not working,pls check
Tue Apr 23 2019, 07:20:20, download attachment onoffled.ld
(no subject) (by MGP)
This must work, otherwise there is something wrong with the hardware.
Are the settings OK, do you have a 16Mhz crystal?
Tue Apr 23 2019, 07:26:30, download attachment onoffv2.jpg
(no subject) (by MGP)
Sorry wrong file..this is the good one.
Tue Apr 23 2019, 07:27:35, download attachment onoffledV2.ld
(no subject) (by Amod Pathak)
MGP,
Yes I have 16Mhz crystal.
Tue Apr 23 2019, 07:42:11
Relay on off (por Amod Pathak) (by Calubert)
Probaste el software gajananbhoj.ld.
Ami me funciona con el simulador
Tue Apr 23 2019, 11:40:45
(no subject) (by Amod Pathak)
Not tested yet.Iam sending details of my code
Tue Apr 23 2019, 11:47:37, download attachment IMG_20190406_130834.jpg
(no subject) (by Amod Pathak)
why my this program is not working.when THRTMOSTATNC is high
then COMPRESSOR should go off.
Thu Apr 25 2019, 12:05:29, download attachment gajananbhoj.ld
(no subject) (by Calubert)
Si funciona, con que versión de LDMicro estas trabajando.
abre Tu programa escalera, una vez abierto, clics en la ventana SIMULAR activa Modo simulacion, y iniciar simulación en tiempo real.
una vez lo tengas oprimir Xwlc1 todas las lineas cambiaran de color y después oprimir Xthermostatnc.
Una pregunta no funciona en LDmicro o en tu procesador
Thu Apr 25 2019, 12:24:08
(no subject) (by Calubert)
Veo que tienes 2 Ycirvalve, Esto no es correcto no puedes activar 2 Ycirvalve ya que son puertos de salidas, lo que si que se puede hacer es con los puertos de entradas que son X, Esto se resuelve con los reles internos que son Rcirvalve, cambia el contacto Ycirvalve por Rcirvalve, y haces un contato interno alto o bajo y este contacto Rcirvalve que active el puerto Ycirvalve una sola vez este contacto.
Thu Apr 25 2019, 12:48:44
(no subject) (by MGP)
You made a hardware fault, the program should work.
Thu Apr 25 2019, 13:31:23
(no subject) (by Amod Pathak)
Is this circuit is wrong with ldmicro.
Sat Apr 27 2019, 04:58:10, download attachment images1.png
(no subject) (by MGP)
No, nothing is wrong, it should work.
Have you already figured out how it works?
Led ON = input PIC low
Led OFF = input PIC high
Sat Apr 27 2019, 17:04:23
(no subject) (by Amod Pathak)
Led on when input is high.led low when input is low.
Sun Apr 28 2019, 06:43:55
(no subject) (by MGP)
That is not what you diagram shows.
Sun Apr 28 2019, 07:07:32
(no subject) (by Amod Pathak)
How I can do PORTA all to low and PORTB all to low
Sun Apr 28 2019, 08:53:50
(no subject) (by MGP)
Invert all the inputs (negated), see your program
Sun Apr 28 2019, 11:58:22, download attachment gajananbhojV3.ld
(no subject) (by Amod Pathak)
why this program is working
Sun Apr 28 2019, 13:11:50, download attachment onnoff.ld
(no subject) (by MGP)
I dont know, you tell me, I cannot see what you are doing, thats why we cannot help you, we can only guess.
Sun Apr 28 2019, 15:10:28
(no subject) (by Amod Pathak)
Pls share a low input optocoupler circuit for switch
Mon Apr 29 2019, 10:03:45
(no subject) (by MGP)
I think you have another issue, take a look at the picture attached.
Mon Apr 29 2019, 11:24:45, download attachment pictureLD.jpg
(no subject) (by Calubert)
por Amod Pathak) aquí tienes reglado, pero te comunique en mensajes anterior que hicieras el cambio por los reles internos (R) por las Y repetidas ya que las salidas no se pueden activar nada mas una vez,
prueba y me dices.
también se tiene que mirar las patillas de salida se tiene que tener en cuenta los pines de salida el el micro controlador ya que hay pines que solo son entradas y los usuarios los usan como salida y no funciona. el programa me funciona perfectamente.
mira que los contactos los tienes cerrados (NPN), que quiere decir que cuanto le des tensión al micro-controlador se activaran las entradas como las salidas.
Mon Apr 29 2019, 12:51:30, download attachment gajananbhojV3.ld
(no subject) (by Calubert)
Si (by MGP) es el error que tiene y creo que el pin 4 solo es entrada y no se puede usar como salida.
Mon Apr 29 2019, 13:10:30
(no subject) (by Amod Pathak)
On smiulation it is working but on my hardware it is not working.
Thu May 2 2019, 06:04:03, download attachment gajananbhojV3.ld
(no subject) (by Amod Pathak)
Iam totally confused
Thu May 2 2019, 06:04:55
Para (Amod Pathak) (by Calubert)
(por Amod Pathak) Puedes mandarme tu circuito del micoprocesador y el programa de LDmicro, te lo revisare y te lo haré en hex.
para el micro que tu estas usando y la PBC. de que país eres.
Thu May 2 2019, 07:17:13
(no subject) (by Amod Pathak)
Iam from India.Please find attached PCB layout of my PLC.
Thu May 2 2019, 08:08:55, download attachment plcself (1).jpg
(no subject) (by Amod Pathak)
Microcontroller 16f877A
Thu May 2 2019, 10:30:44
(no subject) (by MGP)
All the output optocouplers are in the wrong direction and check the schematic of those again.
Thu May 2 2019, 13:18:29
(no subject) (by Amod Pathak)
I have changed the direction of all optocoupler
Thu May 2 2019, 13:21:13
(no subject) (by MGP)
Then all the collectors of the output opto's are connected to the GND of the 12V and this is bad...
Thu May 2 2019, 13:37:20
(no subject) (by MGP)
Sorry, it's not the case...
Thu May 2 2019, 13:39:16
(no subject) (by MGP)
Do you have a schematic?
Thu May 2 2019, 13:40:56
(no subject) (by Amod Pathak)
No,I don't have schematic.
Thu May 2 2019, 13:45:38
(no subject) (by MGP)
Do you have a schematic of one output relay?
Thu May 2 2019, 16:22:11
(no subject) (by Amod Pathak)
Pls find attached file
Thu May 2 2019, 21:16:01, download attachment IMG_20190503_064146.jpg
(no subject) (by Amod Pathak)
Pls find attached file
Thu May 2 2019, 21:16:27, download attachment IMG_20190503_064146.jpg
(no subject) (by MGP)
The best you can do is remove the 16F877 and test the optocircuits, then you also can see what they need as input, a 5V or 0V.
With the help of a voltmeter can measuring what is wrong if it does not work.

The led in the output circuit of your drawing is in de wrong directon and also on the pcb.
Fri May 3 2019, 06:45:36
(no subject) (by Calubert)
por Amod Pathak) mándame el programa en escalera en LDMICRO en RAR o Zip, yo te haré el circuito en Proteus, y lo probare y sabrás donde esta el fallo, te lo hago porque veo que tienes varios días este problema y sera para ayudarte a solucionarlo.

veo que tienes mas entradas como salidas de lo que pones en el gajananbhojV3.ld

by Amod Pathak) send me the program in ladder in LDMICRO in RAR or Zip, I will make the circuit in Proteus, and I will try it and you will know where is the fault, I do it to you because I see that you have several days this problem and it will be to help you fix it

I see that you have more inputs as outputs than what you put in the gajananbhojV3.ld

अमोद पाठक द्वारा) मुझे RAR या ज़िप में LDMICRO में सीढ़ी में प्रोग्राम भेजें, मैं प्रोटीन में सर्किट बनाऊंगा, और मैं यह कोशिश करूंगा और आपको पता चल जाएगा कि गलती कहां है, मैं आपसे करता हूं क्योंकि मुझे लगता है कि आपके पास यह समस्या कई दिनों की है और यह आपकी मदद करना होगा इसे ठीक करो

मैं देखता हूं कि आपके पास ganananbhojV3.ld में डाले गए आउटपुट की तुलना में अधिक इनपुट हैं
Fri May 3 2019, 07:27:41
(no subject) (by MGP)
You can try but I think it's a hardware issue.

I never have made a program that works in the simulator and not on a PCB and I made ~200 programs... maybe more.

I also have my doubts about the PCB, print tracks of the power supply are way too long and too small.

And without schematic we can only guess, see the resistor on the pcb drawing.
Fri May 3 2019, 07:53:12, download attachment PCBpic.jpg
(no subject) (by MGP)
Btw. both VDD and VSS must be connected.
Fri May 3 2019, 08:16:06
(no subject) (by Calubert)
Una pregunta Amod Pathak esta PBC esta fabricada por ti o es una ya en venta, la resistencia que marcas estas usándola a negativo - necesitas una resistencia mas por acoplador a positivo + para hacer el 0v o 5v. (Bajo o Alto sino lo haces puede que tede fallos o se activen o nunca se desactiven ya que los retornos de corriente se quitan con una resistencia a alto o bajo según si trabajas a PNP = + o NPN = - )

Esta placa de PBC no esta bien Para lo que quieres hacer te faltan componentes
Fri May 3 2019, 09:01:54
(no subject) (by Amod Pathak)
My relay optocoupler circuit works with 0V.
Fri May 3 2019, 09:12:34
(no subject) (by Amod Pathak)
I manufactured this PCB.if you have any diagram then pls share
Fri May 3 2019, 09:15:09
(no subject) (by Calubert)
como se llama tu programa que hiciste el diagrama, Proteus, Multy sin, yo trabajo con estos, si usas el Proteus que sepas que puedes hacer la simulación en el proyecto en proteus con el Hex. de LDMICRO.
yo para ayudarte necesito saber tu programa en escalera con LDmicro y te harre el diagrama para que tu hagas la PBC. pero necesito saver tu escalera real ya que tengo que asignar los pines correctos de entrada y salidas del micro-controlador añadirlas para que todo te funcione correcto, yo te lo puedo probar a tiempo real ya que tengo una PCB fabricada por mi para hacer las pruebas y después que se testes se fabrica en series para su venta.
Fri May 3 2019, 10:57:55, download attachment eb3187dc-8080-4070-9709-dc592cf9929f.jpg
(no subject) (by Amod Pathak)
Calubert,
Thanks for help.In my PLC I need 5 inputs and 8 output.In my ladder I got stuck in second input so I couldn't go further inputs.
Pls send me link for proteus.
Fri May 3 2019, 11:11:59
(no subject) (by Amod Pathak)
Calubert,
Can you send PCB to me or schematic.
Fri May 3 2019, 11:20:24
Proteu para instalarlo (by Calubert)
Fri May 3 2019, 11:20:35
(no subject) (by Amod Pathak)
Calubert,
Can you make PCB layout for me .for 5 inputs and 8 output.
Fri May 3 2019, 11:24:56
(no subject) (by Calubert)
Pero que quieres que te mande si no se que programa quieres, o que tipo de escalera si no se que quieres que haga el software no podemos hacer el arware.
1º hacer escalera.
2º fabricar PCB ( no podemos hacer una PCB si no sabemos que Software tenemos entendiste)
Fri May 3 2019, 11:25:29
(no subject) (by Amod Pathak)
Can I have optoisolated circuit for input and 12v relay control circuit as an output.for 16f 877a
Fri May 3 2019, 13:01:28
(no subject) (by Calubert)
mírate el generador y mira la resistencias que están a masa - cuando mandas voltaje 5V+ al ser mayor los 5v que la intensidad de negativo - , cuando dejas de mandar 5V+, al ser mayor el negativo - deja de emitir. y deja a 0 el opto,
Fri May 3 2019, 14:38:05, download attachment csm_optocoupler_left_243ae4bffb.png
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):