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 - examples

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

examples (by oster)
Hello Jonathan, please show a sample program on the picture. Thank you.
Mon Aug 30 2010, 05:19:11, download attachment 1.GIF
(no subject) (by David R)
I dont think that will work vary well as the pic will miss pulses as the frequency goes up,

I would feed into A counter or bcd converter chip 40??
and read the digital state.

or you could use A F/V converter and use the analog input.

David.
Fri Sep 3 2010, 00:29:14
(no subject) (by oster)
The frequency varies 0-20000-0, chaotic. Such a function can be done in the microcontroller, I would like to LDmicro.
Sun Sep 5 2010, 03:37:38
(no subject) (by oster)
Jonathan could this example as a match to my problem? Is it possible to put the timer is less than 100ms. It is necessary to T1 and T2 set to 0.1 ms, approximately. Thank you.
Thu Sep 9 2010, 16:59:44, download attachment primer.ld
(no subject) (by Jonathan Westhues)
The example that you post won't work unless the cycle time is at most one half of the period of the highest-frequency input signal. Otherwise, you will miss some of the edges in the input signal; so the measured frequency will alias down, and you'll get an incorrect result. This is a consequence of the Nyquist theorem.

At 20 kHz, that would correspond to a cycle time of 25 us. This is not very practical. So as David says, some type of external circuitry, like possibly a frequency-to-voltage converter (like the LM2917), would be required.

(If LDmicro supported the capture-and-compare hardware, and if the part that you were using had a spare capture-and-compare unit that wasn't required to measure the cycle time, then you could do it all on-chip. But LDmicro doesn't currently support that.)
Thu Sep 9 2010, 23:21:26
(no subject) (by oster)
Thank you Jonathan.
Is it possible to put the timer is less than 100ms?
Fri Sep 10 2010, 04:01:41
(no subject) (by Jonathan Westhues)
That wouldn't help. As I write above, the problem is that the cycle time would have to be impractically fast (~25 us). This has nothing to do with the timer periods.
Fri Sep 10 2010, 10:16:19
(no subject) (by oster)
I need another program to 1-16ms.
Sat Sep 11 2010, 06:20:54
(no subject) (by oster)
Hello Jonathan. This little program. LED on Ya do not want to work, not Proteus, no microcontroller. Please tell me why
Thu Nov 25 2010, 05:19:05, download attachment led.rar
(no subject) (by Shafikul Azam Khan)
Try this
Thu Nov 25 2010, 12:56:46, download attachment oster_led.ld
Como utilisar ent. IO (by Antonio santos)
Caro senhor,meu nome é Antonio tenho 13 anos seu programa é demais, estou fazendo muitas montagens, mas nao consigo ler uma tenção de 0a5V na ent.IO não entendo como utilizar os comandos, apenas gostaria de formar uma serie de resistores e em cada nivel de tenção ativar uma saida correspondente com o pic16f877 ficarei muito feliz com uma resposta sua.obrigado

5v *--ww-c1-ww-c2-ww-c3-ww-c4-ww-c5-ww-*-ww--*0v


ww = resistor
c1...= chaves NA
1º*ent.5v
2°*saida para IO
3º* gnd
Tue Mar 8 2011, 07:36:21
(no subject) (by Antonio santos)
Do:português▼Para o:inglês▼


Tradução do português para inglês


How utiliser ent. IO (by Antonio Saints)
Dear Sir, My name is Antonio I am 13 years your program is awesome, I'm doing a lot of mounts, but I can not read an intention of the 0a5V ent.IO not understand how to use the commands, just wanted to make a series of resistors and in each level of maintenance to enable an output corresponding to the PIC16F877 will be very happy with a response sua.obrigado

5v *-- ww-ww c1-c2-c3-ww-ww-ww-c4-c5-ww-ww *- - * 0v


ww = resistor
c1 ...= keys NA
1 * ent.5v
2 ° * output to IO
3 * gnd
Tue Mar 8 2011, 07:40:32
using ldmicro lcd interface with pic (by Amir Qayyum)
how can i use lcd with pic
what should be the program
Thu May 19 2016, 12:16:11
(no subject) (by MGP)
Amir, you need a rs232 LCD display(TTL), buy or make one.
http://cq.cx/ladder-forum.pl?action=viewthread&parent=2108
Fri May 20 2016, 05:36:18
I need help with ldmicro (by Israel )
good evening

I'm starting to use the ldmicro program. I was trying to make a program to automate the mixing of a chemical with water using 3 electrovalves to control the inlet and outlet of liquids in the reservoir, 3 capacitive sensors to monitor the level of the reservoir, a DC motor to move the mixer, and a Button to start the process. How could I do this using the PWM, Set, and Reset commands? Can you help me?
Fri Mar 17 2017, 23:10:35
program to automate the mixing of a chemical with water ldmicro (by Israel Avillano)
good evening

I'm starting to use the ldmicro program. I was trying to make a program to automate the mixing of a chemical with water using 3 electrovalves to control the inlet and outlet of liquids in the reservoir, 3 capacitive sensors to monitor the level of the reservoir, a DC motor to move the mixer, and a Button to start the process. How could I do this using the PWM, Set, and Reset commands? Can you help me?
Mon Mar 27 2017, 19:48:01, download attachment misturador.ld
(no subject) (by MGP)
Why do you need PWM? has the motor a DC controller?

It is very difficult to make a program if we do not know how it must work.
A drawing (handmade) of the reservoir with the contacts and motor and valves would be very usefull.
Tue Mar 28 2017, 01:58:08
Here is the drawing of the reservoir and the program I made in ldmicro (by Israel Avillano)
Here is the drawing of the reservoir and the program I made in ldmicro. I do not know if it's right. If you can help me understand a little better, thank you
Tue Mar 28 2017, 20:16:58, download attachment Figura projeto.jpg
(no subject) (by MGP)
Israel, I cannot figured it out what the names of the contacts mean in the Ldmicro file, even google translation can't do it.

Maybe you can give me the list how it must work.

- start with water
- until mid sensor is reached
- then start the product until high sensor is reached

etc...

Or change the LD-names in english or give the sensors/contacts and valves a number, like
Highsensor = S1
Midsensor = S2
Lowsensor = S3

AquaValve = V1
ProductValve = V2
Saida = V3

Startbutton = B1
Stopbutton = B2

It is not possible for a programmer to write a program if he does not know how it must work.
Wed Mar 29 2017, 04:38:58
automate the mixing of a chemical with water (by Israel Avillano)
Below I describe what the procedure would be. What I sent you I believe I did not do right. Disregard.

Part of the industrial process of a beverage factory is to mix a product with a chemical X with water. You have been hired to automate this mixing process using a PLC, which should be programmed in Ladder.
The system consists of the following components:

1. Three solenoid valves (24 VDC driven) to control the inlet and outlet of liquids in the tank: one for water inlet, one for the chemical inlet and one for ready product outlet, after mixing.
2. Three capacitive sensors, to monitor the reservoir level;
3. A DC motor for moving the mixer;
4. A spring return button to start the process.

1.1. System operation
At the touch of a button, the tank should fill with half water, then complete with chemical X. Note that the two products can not enter the tank at the same time, as it is necessary to control the proportion of each . So, first fill with water and then fill with the chemical.

When the reservoir is full, the mixer should be started. For 30 seconds, it should rotate at half speed. Then you should rotate for another 40 seconds at full speed.

After mixing the liquids for the indicated time, the final product should flow through the outlet until the tank is empty. Note that after emptying, the outlet should be closed.
See the scheme of the system:

The solenoid valves are used to allow or block the flow of liquids. When it is 24 VDC it releases the flow. At 0 VDC the flow is interrupted. Use the sensors to monitor the level of the liquid inside the reservoir, and the electrovalves to fill it and to empty it as needed.
Wed Mar 29 2017, 21:34:57
(no subject) (by MGP)
In Annex your program as I see it.

Good luck
Thu Mar 30 2017, 05:07:14, download attachment misturador-final-V1.ld
(no subject) (by MGP)
Sorry, I see now that I posted the wrong file, without the picture of the container.
Here you have the zip-file.
Sat Apr 1 2017, 15:32:48, download attachment Mistrurador-final-V1.zip
Thanks (by Israel Avillano)
Thanks a lot for the help
Sun Apr 2 2017, 19:52:39
programa misturador (by Israel Avillano)
You would need to insert the level sensors to control the amount of liquid inside the mixer. Can you give me a hand?

Ex:. Misturador-final-V1
Fri Apr 7 2017, 23:44:43
(no subject) (by MGP)
What do you mean with level sensor?
What type of sensor?

Wat does it have todo?

If you program something you need to know excatly how it works and what it must do.
A µcontroller can't think of itself.
Sat Apr 8 2017, 02:20:43
misturador (by Israel Avillano)
Turning the knob on, you should start filling the box with water (RC2), how much the mid-level sensor should stop filling with water and start filling the remainder with the chemical (RC3) when reaching the high level sensor ( Full box), stop stuffing the box with the chemical and start the mixer motor, when turning off the mixer after the two speeds, should trigger the valve emptying the carton. Turning off the valve when the low level sensor is turned off.


Low Level Sensor: Control valve that empties box

Mid-level sensor: turns off the output corresponding to water and at the same time chemical alloy.

High Level Sensor: Turn off the chemical and start mixing at low speed.
Sat Apr 8 2017, 07:26:24
(no subject) (by MGP)
That is what is the do, only the start (NO) and stop (NC) buttons are push-buttons not switches.

You can simulate it in LDmicro and be sure that you simulate the contacts or sensors as it should.

Filling with water, first close S3 and then S2 then S1
Empty the container , open S1 then S2 and the S3 and after 10sec the hole circuit switch off.
Sat Apr 8 2017, 10:08:18
misturador (by Israel Avillano)
I made the program and am posting here for any future consultations. It worked normal
Sun Apr 16 2017, 19:06:32, download attachment misturadorfinal.ld
(no subject) (by MGP)
Israel, as for me it's not working, if you push startbutton the vessel fills with water and first S3 is closed, then S2 is closed (S3 remains closed).
From that moment the chemical must flow, but nothing happens.
Mon Apr 17 2017, 02:14:32
books (by Israel Avillano)
Is there a complete ldmicro language book for beginners with plenty of examples? If you have, kindly tell me. I would like to buy it
Mon May 1 2017, 21:39:53
(no subject) (by Boris)
in this thread "internal oscillator frequency is too low for 8 digit control how to increase"
Find "Samples.zip"
Tue May 2 2017, 12:21:26
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):