Feature to make REST POST calls from KMotionCNC / KFlop

Moderators: TomKerekes, dynomotion

Post Reply
BaxEDM
Posts: 11
Joined: Mon Aug 27, 2018 10:15 am

Feature to make REST POST calls from KMotionCNC / KFlop

Post by BaxEDM » Fri Sep 27, 2019 8:09 am

Hi,

I think a very valueable addition to KMotionCNC and KFlop, would be a feature to post simple REST calls. This would allow communication with other applications.
As an example, I want to recieve an email when my CNC machine has an error. Right now I have realised this by a KFlop program that writes an empty file to disk when this event happens. I then have a separate program that continuously checks for the presence of that file, and if its there, it deletes it and sends the email. This works, but it is an ugly solution.
I have an additional program with a dashboard with allsorts of buttons (to control the arc generator in an EDM machine). it would be very usefull if KMotionCNC supports simple REST calls, that would allow me to control the arc generator from KMotionCNC.
A practical implementation could look really similar to the feature of KMotionCNC that allows you to call a thread with a var upon a button press. For REST calls, the thread name could be the IP address instead and the var the text string of the REST post body.

Really curious what you think about this.

User avatar
TomKerekes
Posts: 982
Joined: Mon Dec 04, 2017 1:49 am

Re: Feature to make REST POST calls from KMotionCNC / KFlop

Post by TomKerekes » Fri Sep 27, 2019 4:24 pm

Hi BaxEDM,

I'm not familiar with REST calls. KMotionCNC's Actions have the capability to invoke a PC Program. Instead of writing an empty file to disk and have a PC program monitoring it, couldn't you just invoke a PC Program that sends an email directly? MCodes can also pass PQR parameters. Would that be simple enough?
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply