In the manual - they say you can 'and' and 'or' and such..  You need a ,
then the operator..  But I think maybe the limit is 2..

http://linuxcnc.org/docs/stable/html/ladder/classic-ladder.html#_compare


   -

   (, ) separate into groups example %IF1=2,&%IF2<5 in pseudo code
   translates to if %IF1 is equal to 2 and %IF2 is less than 5 then the
   comparison is true. Note the comma seperating the two groups of
   comparisions.


A broad google search didn't bring up anything..

sam

On Tue, Nov 29, 2022 at 9:04 AM Todd Zuercher <to...@pgrahamdunn.com> wrote:

> Oh I misunderstood your question. Yes I think a single variable comparison
> block is limited to only a single comparison of a variable to one constant
> or another variable.  I am surprised that it worked with the last two
> compares combined into a single block.  So for your row of logic below I
> would have thought it would require 3 comparison blocks in a row on the
> same line.  One each for %IW0<%W0, and %IW0>0, and %IW0<7.  Are you certain
> your logic worked completely, and one or both of the last two were not
> ignored.
>
> Todd Zuercher
> P. Graham Dunn Inc.
> 630 Henry Street
> Dalton, Ohio 44618
> Phone:  (330)828-2105ext. 2031
>
> -----Original Message-----
> From: Sam Sokolik <samco...@gmail.com>
> Sent: Monday, November 28, 2022 8:57 PM
> To: Enhanced Machine Controller (EMC) <emc-users@lists.sourceforge.net>
> Subject: [Emc-users] Classic ladder compare blocks..
>
> [EXTERNAL EMAIL] Be sure links are safe.
>
> It doesn't say anywhere in the linuxcnc manual for classic ladder - but is
> there a limit for the compare block to just 2 compares?
> ie..
>
> I had this in the compare
> %IW0<%W0,&%IW0>0,&IW0<7
> For the life of me the logic just wasn't working.
> Finally I put it in 2 separate compares..
> %IW0<%W0 in one..  followed by %IW0>0,&IW0<7
>
> This worked as expected..
>
> BTW - the old emco turret with no feedback should work pretty darn well
> with a little ladder logic..  Only 1 output.  (logic 0 runs the turret into
> the pawl through a current limiting resistor..   logic 1 runs the turret
> clockwise to the next tool.)
>
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJGGPob1iKj8&amp;data=05%7C01%7Ctoddz%40pgrahamdunn.com%7C0fa3074c034248ba60d508dad1ad2e3a%7C5758544c573f47cebee96c3e0806fb43%7C0%7C0%7C638052838992711450%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=B9AYShdhN79RyUPXJrTdSYeNycxAnDlMyFFgo6mdgDA%3D&amp;reserved=0
>
> The original Emco compact 5 CNC, when you would call a tool - say you are
> at tool 1 and going to tool 3 - would stop at tool 2 and index.   (it stops
> at every tool location between the one it was at and the one you called)
>
> I think this was probably convenience as you need 2 different time delays
> - the initial one to go to the next one..  (slightly longer than every
> pocket after the first..)  I am currently using 2.2 seconds for the first
> tool -
> 1.8 seconds for every tool after.
>
> kinda neat.
>
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-users&amp;data=05%7C01%7Ctoddz%40pgrahamdunn.com%7C0fa3074c034248ba60d508dad1ad2e3a%7C5758544c573f47cebee96c3e0806fb43%7C0%7C0%7C638052838992711450%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=aaOUNvxcdaW9Kw%2F%2FZtos6aGo98LDtAr4jRK7pO22NDs%3D&amp;reserved=0
>
>
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to