M66

More
12 years 9 months ago #42931 by billykid
M66 was created by billykid
hi
I'm trying to use the M66 for the signal arcok a small plasma that I am building.
I'm using this: net arc_ok motion.digital-in-00 <= parport.0.pin11-in
with the line P0 L4 M66 Q5 is ok but after 5 seconds without signal movement begins the same.
I tried M66 P0 L0 but it never works, maybe you can use only the options L3 or L4?
thanks in advance
Mauro

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago - 12 years 9 months ago #42936 by Rick G
Replied by Rick G on topic M66
Hello,

You need to determine what it will do if there is no output, try something like...
Code:
M66 P0 L3 Q5 (wait up to 5 seconds for digital input 0 to turn on) O105 IF [ #5399 ne 1] M5 (debug, No arc transfer) o106 return O105 ENDIF

Otherwise it waits then after the waits continues the code.
The result of the M66 is the variable #5399.

Rick G
Last edit: 12 years 9 months ago by Rick G.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #42937 by andypugh
Replied by andypugh on topic M66

billykid wrote: with the line P0 L4 M66 Q5 is ok but after 5 seconds without signal movement begins the same.

That is because you have a timeout of 5 seconds.

If you want to end the programme if the timeout happens then maybe this will work

P0 L4 M66 Q5
O100 IF [#5399 LT 0]
(MSG, Timeout!)
M2
O100 ENDIF

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #42939 by billykid
Replied by billykid on topic M66
thanks Rick
I think I will leave it M66 P0 L4 Q20 for example .. time long enough to stop.
I tried it with a button and it works fine
regards
Mauro

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #42940 by billykid
Replied by billykid on topic M66
Thanks Andy !
you convinced me to try
regards
Mauro

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #42959 by Rick G
Replied by Rick G on topic M66
Glad you got it sorted out.

Rick G

Please Log in or Create an account to join the conversation.

Time to create page: 0.496 seconds
Powered by Kunena Forum