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 - LDmicro.GitHub news v4.3.5

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

LDmicro.GitHub news v4.3.5 (by Ihor Nehrutsa)
https://github.com/LDmicro/LDmicro/releases/tag/4.3.5
== Release 4.3.5

* Fixed: "Compile ANSIC" crashes, if seleёted (no microcontroller).

* New: Higher PWM resolution available:
0-100% (maximum resolution 6.7 bits)
0-256 (maximum resolution 8 bits)
0-512 (maximum resolution 9 bits)
0-1024 (maximum resolution 10 bits)
LDmicro automatically scales the duty cycle variable from
percent(or binary value) to PWM clock periods.
Fri Jan 12 2018, 21:23:28, download attachment build435.zip
(no subject) (by Alex)
thanks a lot for your work Ihor, the last last about timers i swear, i already understood what you did in 3.5.3v when you posted a wikihow about it( https://github.com/LDmicro/LDm....-in-v2.3-and-v3.5.3-and-later ), i was thinking if it would be possible in adding an option where you can choose either 3.5.3v or 2.3v timer cycle (image attach), i know if i want 1 sec i need to set timer TON 990ms, 2 seconds i need to set 1990ms, but i was thinking that one of the advantages of ldmicro was that it was intuitive for most cases,i mean not need to calculate every moment ton or toff times less 10 ms (if PLC cycle timer set 10 ms) i could set 1 sec and automatically ldmicro made 990ms (intuitive), so maybe it could be possible to add the option described in the image attach, and maybe for not making troubles if choosing 2.3v option the time less than 1 sec, could work with 3.5.3 option, for short times
Sun Jan 14 2018, 00:52:52, download attachment adjust.jpg
(no subject) (by MGP)
First of all, Ihor thanks for the update.

Alex, the timers acting as all PLC related programs.
Now, if I program a TON 1s then its 1 Sec (1000mS) and not 990mS or 1010mS if using a CT of 10mS.
Ofcours, if you work as you describe, 1 cycle time (CT) will be added to make the output 1.

Relay on = 1 CT + time + 1CT relay on

That was a bug like Jonathan once reported.

Of course if you place 2 timers in succession you have to take the CT into account.
The problem lies in the handling of the instructions, here all the instructions are handled one after the other and not in parallel.

Suppose the timer is started with a relay that is located after the timer, then you have a CT more upto the timer.

Everyone's vision on this, but make it the same as much as possible for everyone.
I am in favor of what it is today.
Sun Jan 14 2018, 04:26:46
(no subject) (by MGP)
Btw. I am more in favor of releasing the AND function so that we can communicate better with other SPI devices.

SPI can be made with SRO + AND functions.

That is what LDmicro lacks, the reason why many compile to C.
Sun Jan 14 2018, 05:04:16
Add Pin PWM Need Option (by MAQ)
Dear
in All ic PWM pin Add Please

Thanks you Please no limite PWM
Sun Jan 14 2018, 07:45:05
Bugs in v4. 3.5 (by Ahmad sakr)
Dear sir
Thanks for your great work and for accepting my suggestions for arduino
I found a problem in v4. 3.5
I made very simple program (in the attachment) which is led to be on for ever and used Atmega 16 but after burning the program the led is off.
I make the same program using v2. 3 and after burning on Atmega 16 the led is on
Also another thing I found only one PWM pin for Atmega 16 where in the manual Atmega 16 have 4 pins
Thanks.
Sun Jan 14 2018, 10:25:00
Sorry for the attachment (by Ahmad sakr)
The attachment
Sun Jan 14 2018, 10:28:08, download attachment test.ld
(no subject) (by bfwolf)
To Ihor:

I found a bug in the current version:
If you load the "traffic" example and select 'Compile ANSIC' with (no microcontroller) seleted, the generated traffic.c contains bad prototypes like these:

/* You provide these functions. */
PROTO(extern ldBOOL Read_Ub_Yred(void) { });
PROTO(extern void Write_Ub_Yred(ldBOOL v) { });

These are no prototypes but some mix of prototypes and empty stub-functions. They won't compile...

The generated traffic.h contains the good prototypes:

// You provide these functions.
PROTO(ldBOOL Read_Ub_Yred(void));
PROTO(void Write_Ub_Yred(ldBOOL b));

If you tried to let stub-functions be generated, perhaps you do it like this:

- In the generated c-source:
/* You provide these functions. */
LDSTUB(ldBOOL Read_Ub_Yred(void))
LDSTUB(void Write_Ub_Yred(ldBOOL v))

- In the generated ladder.h_ template:

#ifdef DO_LDSTUBS
#define LDSTUB(x) x { ; }
#else
#define LDSTUB(x) PROTO(extern x ;)
#endif

By the way: the ladder.h_ template ist not generated in the same path (directory) as traffic.c and traffic.h but in the path of traffic.ld ...

Regards and thx in advance ;-)
Mon Jan 15 2018, 11:32:17
last last about timers (by Ihor Nehrutsa)
to Alex and to MGP and all

Please give typical LD rungs with timers TON, TOF, RTO, RTL, TCY, THI, TLO from your practice.

Can anyone tell how timers work in other ladder logic systems?
Is Cycle Time adjust exist in other software?
Tue Jan 16 2018, 16:18:11
in All ic PWM pin Add Please (by Ihor Nehrutsa)
to Ahmad sakr and to MAQ and to all

I saw your post
http://cq.cx/ladder-forum.pl?a...;parent=6794&tt=1514746534

I know that not all PWM pins added.

PWM pins are too labor-intensive(too time-consuming).

Atmega16 PWM and some other PIC and AVR PWM are in pre-release development.

Please tell me the required MCU. I do not want to waste time on the obsolete or unclaimed MCU.
Tue Jan 16 2018, 16:37:35
Atmega 16 led, test.ld (by Ihor Nehrutsa)
Ahmad sakr

I don't see a bug with test.ld

Both v4.3.5 and v2.3 work.

Please repeat testing.
Tue Jan 16 2018, 17:02:35
Atmega 16 test and PWM pins (by Ahmad sakr)
Thanks Ihor
I repeat the test and it's OK now
And for PWM could you add for Atmega 16
Thanks for your great support
Tue Jan 16 2018, 18:04:53
thank you (by sony)
thank you very much for all the time that has been devoted to this project

Sony
Tue Jan 16 2018, 23:02:24
(no subject) (by Ihor Nehrutsa)
to bfwolf

Yes, you right understood the idea.
Thank you for #ifdef DO_LDSTUBS...

Will fix in next release.
Wed Jan 17 2018, 04:48:55
(no subject) (by MGP)
LDmicro = cycle time
PLC = scan time

The scan time at industrial plcs is much more complex than at LDmicro.
The normal scan time is 30 to 60mS (Siemens S7 = 60mS) for the IO port update.
Because of this it seems that all rungs are being executed at the same time

You can also run program blocks faster or program priorities outside of the scan time.
Also the communication buses (modbus ....) work outside of that scan time.

I prefer to work with the LDmicro cycle time, you have full control over it and it is much more flexible to work with, especially when it has to work fast and I love the serial handling of the rungs.

Ihor, do not break your head too much, a bug-free version is much more important.
Wed Jan 17 2018, 07:55:10
to all (by Ihor Nehrutsa)
Updated:

TON, TOF, etc. in v2.3 and v3.5.3 and later
https://github.com/LDmicro/LDm....-in-v2.3-and-v3.5.3-and-later

Please give typical LD rungs with timers TON, TOF, RTO, RTL, TCY, THI, TLO from your practice.
Fri Jan 19 2018, 09:27:37
(no subject) (by Alex)
Thanks a lot Ihor, really aprecciate it
Fri Jan 19 2018, 11:49:57
Please add PWM Pin (by MAQ)

THANKS TO Co-OPERATION WITH ALL OF US Mr.Ihor Nehrutsa

Its most Important

Three Phase MOTOR CONTROL CIRCUITS NEED
( Carrier frequency Generator ) 120 Degree Phase Difference at EACH PHASE START ZERO-CROSSING 0 to 99% duty Cycle
IN THREE PHASE CONTROL WE NEED THREE PIN PWM CONTROL.
OR Six PWM PIN IF WE NEED three INVERTED PIN ( OTHERWISE THREE PIN TO CONVERT for INVERTED PIN BY LOGIC GATES )

PLEASE SEE ATTACHMENT FOR MORE UNDERSTAND ABOUT THAT.

THANK YOU
Mon Jan 22 2018, 01:30:09, download attachment FREQUENCY INVERTER.JPG
(no subject) (by Ihor Nehrutsa)
to MAQ

You need the Motor Control Products
https://www.microchip.com/ParamChartSearch/chart.aspx?branchID=55

The Complementary Waveform Generator produces complementary waveforms with the dead-band delay from a selection of input sources.
Mon Jan 22 2018, 04:06:05
(no subject) (by georges karimeh)
i can not simulate my programme the programe close automaticly
Mon Nov 26 2018, 19:49:12
(no subject) (by MGP)
Use version 4420, there are 2 bugs in version 4430.

Version 4420 has 1bug, when you have an empty row and you compile it closes automaticly
Tue Nov 27 2018, 00:27:10
French lang-tables (by José GILLES)
I

I'm discovering ldmicro release 4.4.3.0, after trying old release 2.3
I rebuilt the program under VC++ 10.

I noticed that french lang-table was very poor and menues where still mainly in english.
I have soved the pb by upgrading lang-fr.txt file and generating a new lang-tables.h with perl.

To achieve the job I've had to slightly modify menues titles in my maincontrols.cpp to prevent some inconsistancies.
I also commented "TODO" menues, the interest of which is not obvous for the enduser, so that I didn't translate them.
(Search "JG" in .cpp to see my slight modifications)

Maybe you'd like to include this new French table in the new release ? It's in attached zip file, with my executable to have a look at the result.

Best regards
JG (France)
Tue Nov 27 2018, 09:34:03, download attachment Fr-Langtables.zip
(no subject) (by Alex)
well i don´t speak french, it looks kind of organized,
Tue Nov 27 2018, 14:31:54
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):