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 - One Shot Rising

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

One Shot Rising (by Frank)
Hi Guys

working on a small project which checks 4 wires to ensure they are connected correctly...Im using a sn4052 to select the wire and also select a onboard resistor and then give me pass ,fail indication on leds...im using 2 pin bi coloured leds ,so on start of test the pic micro (16f88) sets up the lower nibble as inputs (no led indication) and turn on each led when tested , high = fail low = pass.....when all tested a delay then clear testing flags and should be ready for next test....
Whats happening is at the end of the test delay is it appears to be clearing all the flags and setting theled pins as inputs..
i quite like this but im curious to know what im doing wrong for this to happen....Have attached my ldmicro file ,please have a look ,any advice appreciated...
Regards
Frank
Sat Jul 11 2020, 19:23:48, download attachment POLARITY_TESTER2.ld
One Shot Rising (por Frank) (by paulino)
You do not have to repeat outputs that are turned on by several variables (Example: YPORT1) you have it set on several output lines and this does not work in this software.
In order for it to work correctly, all the functions you do within the program put them with the internal relays Note: without repeating the name of the internal relay, the same happens as the YPORT1 outputs, so whenever they are outputs as internal relays at the end of line do not repeat them, Look at the example that I give you, EYE the reset or coils (S) you have to do the same, the example has been made so that you see the assembly of a beginning to your program.

please tell me if you understood:

No tienes que repetir salidas que las enciendan varias variables (Ejemplo: YPORT1) lo tienes puesto en varias lineas de salida y esto no funciona en este software.
Para que te funcione correcto, todas las funciones que hagas dentro del programa pon las con los reles internos Nota: sin repetir el nombre del rele interno, sucede lo mismo que las salidas YPORT1, por ello siempre que sean salidas como reles internos en final de linea no repetirlos, Mira el ejemplo que te pongo, OJO los reset o bobinas (S)tienes que hacer lo mismo, el ejemplo se ha hecho para que veas el montaje de un principio a tu programa.
Sun Jul 12 2020, 08:01:14, download attachment prueba-salidas.ld
(no subject) (by Frank)
Hi Paulino

Thank you for your response... I understand its not good programming practice to repeat outputs on several rungs , but strangely that part of the program works fine as it correctly selects which wire im testing...I will modify the code so im only using the coils once and see if it makes any difference..
Thanks again
Frank
Wed Jul 15 2020, 17:45:24
(no subject) (by Ziggy)
What Paulino said.

I too learned this lesson the hard way. Output coils should be calculated once only and then energised .

So if You have a series of rungs which affect output coils , each rung will be calculated in sequence it occurs in the ladder , the output coil will then transition through each calculated result and only the last calculation will become effective.

It may be that Your choices of rungs gives You a kind of satisfactory outcome but You should evaluate ALL output coil values, and only then pass the value to the actual output coil... once only.

Yes I too am guilty of this sin.
Wed Jul 15 2020, 19:53:23
One Shot Rising (por Frank) (by paulino)
One Shot Rising (by Frank).
They do not work because if you look at the simulator you will see that the names of the final outputs are not activated 0, 1 or 1, 0 what Ziggy says is correct, I am not sure of the manual that is explained but the manual that I did with Hinor in Spanish ( Castilian) I put that they were not put duplicate outputs, if we realize it speaks of the inputs that can be repeated infinitely but the outputs only once.
A note for all those who try to learn to program that I know do not attend the market a repeated output in PLCs, you have to learn to move, read, record.


One Shot Rising (por Frank).
No funcionan ya que si mras el simulador veras que los nombres de las salidas finales no se activan 0, 1 o 1, 0 lo que dice Ziggy es correcto, no estoy seguro del manual este explicado pero el manual que hice con Hinor en Español (castellano ) puse que no se pusieran salidas duplicadas, si nos damos cuenta habla de las entradas que se pueden repetir infinitas pero las salidas solo una vez.
una nota para todos los que intentan aprender a programar que yo sepa no asisten en el mercado una salida repetida en PLCs, hay que aprender a mover, leer, grabar.
Thu Jul 16 2020, 04:55:58
FIXED (by Frank)
Firstly Paulino.....the outputs did work in the original ladder, but i have modified the ladder diagram so they now only are used on a single rung......

The problem i was having was a silly one on my behalf.....the button input which i use to start the test and clear some flags and setup the led outputs as high impedence (inputs)... i programmed as an active high signal when actually it was active low....so change my n/o + n/c button contacts and all was good.

Cheers
Frank
Sun Jul 19 2020, 21:18:06
One Shot Rising (by paulino)
Thanks for reporting that it was fixed. but I insist that duplicate outputs cannot work, even if you tell me that they work (it is impossible to believe it) and if you are so sure send me a test software that you think works.
and I repeat thanks to the team for reporting the solution will serve for more kids in this interesting forum.


Gracias por informar que se soluciono. pero insisto no puede funcionar salidas duplicadas, aun que tu me digas que funcionan (me es imposible creerlo) y si tan seguro estas mándame un software echo de prueba que tu creas que funciona.
y repito gracias del equipo por informar la solución servirá para mas chavales de este foro tan interesante.
Mon Jul 20 2020, 06:04:40
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):