Question For Kurt or anyone with SQL Experience and HAL

14 Jan 2020 22:49 #154855 by Donb9261

I am currently working the kinks out of using SQlite3 in QtPyVCP. Works great for most things.

But, what I would like to have is a running db to collect specific hal pins such flood, mist, probe, cycle start, feed hold, etc. Many of which will be used to create OEE metrics for WebUI usage and ERP integration.

The issue for me is what is best practice in regard to where I access the pin status. I found you obj-status(Unable to make it work yet) file under utilities and wondered if this may be the best place to create the SQL for updating the db. Sqlite is just the test db and will be moved to MySQL and Oracle once a the syntax set is complete.

In the end I just need to have a polled status update across all pins and I will hash out the ones i need into a dict for extraction.

Hoping my question is not too challenging nor boring. Any humble offerings would be greatly appreciated.

Don San

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

15 Jan 2020 12:55 #154914 by BigJohnT
To get LinuxCNC status you do that with the Python Interface


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

15 Jan 2020 21:19 #154956 by rodw
Sounds like a very cool project. What ERP? We use Odoo.

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

16 Jan 2020 00:09 #154980 by KCJ
Don, I spent the day today helping a client integrate their ERP system with the control on one of our folding machines, and the whole time I was thinking about how neat it would be to make this possible with LinuxCNC. Great to see you thinking along the same lines!

Object status should be a good start, probably the best solution would be to create a new plugin specifically for this purpose. I think the objectStatus code would be a decent start for watching and getting values from HAL pins. It calls halcmd to get the pin status, which is reasonably fast and very flexible as it does not require any specific HAL components to exist for it to run.

I'll give some thought to the best way to do this and get back to you, though at the rate you are working you'll probably have a working system in the next day or two lol

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

16 Jan 2020 11:33 #155016 by Donb9261
I am pretty familiar with Infor but a driver will have to be created per ERP and then interpreted to a standard interface inside the QtPy code.

The issue is that ERP's have a little magic for each but all as far I know are relatively the same up and to the magic.

It would be a front end pull of the data that the ERP presents based on the requirements for the app. Infor has a series of tables for each module that are designed to allow for remote interfacing of typical data sets allowing far as much or as little data sharing as you desire.

My primary goal is to allow for upper tier ERP connection but also allow mid - lower tier ERP integration. Each dependent on the SQL interface. Oracle, MySql, Postgres, etc..

For now, I just need to concentrate on getting the data standards designed for the front end. Then pull/interpret the data to the UI and internal db.

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

16 Jan 2020 12:03 #155018 by Donb9261
The challenge>>> How much do you need or want to know from both sides? Right.

Primarily I would like to make the data available in a standard API format for monitoring for now. Once you have that functionality I think the rest of it will be much easier to see from a mapping standpoint. In other words, what does the UI need to present to the user from the ERP and what does the ERP need from the user. It needs to make sense for both sides without being overly specific to one system. And how much of the ERP system a business uses.

Without going into specifics each manufacturing entity will a their MO. One entity may be LVHM(Low Volume High Mix) and the next HVLM(High Volume Low Mix). Each requiring a completely different data requirement. HVHM another set. Whether they follow a specific method Lean, Lean Six. So a lot of thought needs to go into the data and flexibility of the API. In some cases, they may just want all the data and then they will take what they need to integrate the ERP themselves custom to their needs.

So far, just scratching the surface of the mechanics to layout the project and the licensing concerns involved. Middleware licensing is complicated and freeware tends to get lost in the weeds of too many variations of licenses to formulate a standard.

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

Moderators: KCJLcvette
Time to create page: 0.132 seconds
Powered by Kunena Forum