Signal every 7 day

More
24 Apr 2015 16:10 #58070 by bkt
Signal every 7 day was created by bkt
There are some way to obtain a signal every 7 or n day? ... timer not help for this.

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

More
24 Apr 2015 17:12 - 24 Apr 2015 17:13 #58074 by ArcEye
Replied by ArcEye on topic Signal every 7 day
You just need to increase the period measured.

What is it for? A maintainence reminder or similar?

Doubt if most people would have it as a HAL component, if there was a break for any reason it would reset to zero.

You could program one to start with linuxcnc and stop when it unloaded, writing to file or similar.
Depends what you want to do with it
Last edit: 24 Apr 2015 17:13 by ArcEye.

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

More
24 Apr 2015 18:01 #58079 by andypugh
Replied by andypugh on topic Signal every 7 day

There are some way to obtain a signal every 7 or n day? ... timer not help for this.


Maybe a cron job. Do you want to set a HAL pin every 7 days, or something else?

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

More
25 Apr 2015 04:43 - 25 Apr 2015 04:45 #58099 by bkt
Replied by bkt on topic Signal every 7 day

What is it for? A maintainence reminder or similar?

Do you want to set a HAL pin every 7 days


yess maintenance reminder ..... cron job sound no good......... my god .... I can use custom Mxxx with bash routine that read my timedayfile.txt, if date time is 1 day bigger add in mycounterfile.txt +1 and refreh timedayfile.txt value with today date..... if in mycounterfile.txt I find a number with 7 value setp myhalpin -> mycustomMessage.trigger.... is right?
Last edit: 25 Apr 2015 04:45 by bkt.

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

More
25 Apr 2015 05:07 #58100 by andypugh
Replied by andypugh on topic Signal every 7 day

cron job sound no good


why not? cron can call a script that runs halcmd setp my.hal.pin
One line of code, one line of config, job done.

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

More
25 Apr 2015 13:28 #58106 by ArcEye
Replied by ArcEye on topic Signal every 7 day
Writing to file sounds more promising.

Unless the machine is running 24\7, presumably you want a cumulative total and it might not be switched on, or realtime available when the cron job is scheduled

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

More
27 Apr 2015 01:08 #58139 by bkt
Replied by bkt on topic Signal every 7 day
thaks at all ...... but normally I work to reduce the cronjob with linuxcnc...... I am no expert but I doubt that the cronjob disturb the work of LinuxCNC .... am I wrong ?

in any case write to files it give the results more reliable and manageable ....

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

More
27 Apr 2015 18:51 #58157 by andypugh
Replied by andypugh on topic Signal every 7 day

I am no expert but I doubt that the cronjob disturb the work of LinuxCNC .... am I wrong ?


I am no expert either, but I wouldn't expect it to cause a problem.

All it should need would be an executable file that ran "halcmd setp my_HAL_pin 1"

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

Time to create page: 0.107 seconds
Powered by Kunena Forum