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 - LD micro tutorial

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

LD micro tutorial (by ritesh )
Hi,
here in tutorial given how to blink LED for 250s and off for 250s it working fine but i am changing the on & off time for 1s than its not working can any one help for this

thanks
Tue Aug 13 2013, 02:31:56
(no subject) (by Jonathan Westhues)
In the tutorial, the LED blinks on and then off for 250 milliseconds each, not seconds. If you wanted 1 s, then it's still necessary to enter the delay in milliseconds, as 1000 ms.

If you wanted 1 ms, then the cycle time is too slow; you would have to make it much faster, like 0.1 ms. In that case, make sure to use a fast crystal, and to keep the program as short as possible, to ensure that it has time to execute in those 100 us.
Tue Aug 13 2013, 03:22:25
(no subject) (by dio)
I use instruction TON, TOF with a delay time 1000 ms, but after I run with Atmega 8, X-TAL 8 MHz, the result of delay time greater than 1000 ms. how to equalize the value. thank you
Wed Feb 25 2015, 05:27:08
(no subject) (by MGP)
Can you upload your program?
I think that you forgot the cycletime.
Wed Feb 25 2015, 07:02:43
(no subject) (by JOHN)
flasher test
Wed Feb 25 2015, 16:53:07, download attachment LED FLASHER.ld
(no subject) (by MGP)
You have to make an oscillator and use a contact of the outputpin or relay to interrupt the circuit.
I have made an example.
Thu Feb 26 2015, 03:07:52, download attachment LEDFLASHER_V2.ld
(no subject) (by MGP)
Ow this example was from JOHN, i didn't see it until now, sorry

Here you have another example.
Thu Feb 26 2015, 04:26:04, download attachment Timer_1sec.ld
(no subject) (by Boris)
I noticed that timers are less accurate if program is longer, is that possible?
Thu Feb 26 2015, 09:08:14
(no subject) (by MGP)
Yes, if you set the cycletime for example on 0.3mS and you have a long program then its possible that LDmicro does not give a warning, but still runs the program after compiling.

The real cycletime is longer than the cycletime setting by several instructions.
The only thing you can do is set the cycletime longer, or use the "masterrelay" instruction, if you need timecritical programs.
Thu Feb 26 2015, 09:29:24
(no subject) (by JOHN)
are you watching for the red column at the right? if cycle is fast you wont see it if you look lower down you can watch the state change you will then know it is working even though the on the right side changing red just a thought
Thu Feb 26 2015, 18:21:45
(no subject) (by Boris)
No John i tested in real life using stopwatch my program is like "Timer_1sec" only I count takt and use it as timer on which You can set value.
Fri Feb 27 2015, 07:33:15
(no subject) (by MGP)
Boris, read this topic also.
Jonathan gives you the solution.

http://cq.cx/ladder-forum.pl?action=viewthread&parent=509
Fri Feb 27 2015, 08:09:33
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):