Building a custom fluid pumping machine

More
28 Mar 2019 21:04 #129856 by yoshimitsuspeed
We are developing a machine that needs to run a couple VFDs and a couple steppers based off analog sensor inputs. We also want a GUI where we can manually input settings and see things like VFD speed, sensor outputs, etc.
I was talking to the guys at Mesa and they seemed to think their cards and HAL would be overkill for the application and the only reason to only consider it was if we were familiar with HAL which we are not but I wanted to post up here to see if anyone had any good ideas for a simple solution that could use Mesa, hal, and or linuxcnc.
I also figured there might be people here who might know of other solutions or be able to make suggestions outside of that option.
We are currently considering a couple other options. I am looking into raspberry pi options. I am not very familiar with pi in this type of application so I am researching it more now.
I also have a friend who has labview and we are looking into this option with PLC controllers and such but I believe it will be many times more expensive than either of the other two options.
I would love any input on this. One of our team is pretty decent in python which definitely makes the pi look like a good option. And a friend who knows a few other programming codes but I don't remember which. I can hack my way through some basic stuff with instruction.
I think one of the bigger questions for us would be a user interface. At least a template or shelf GUI that could be tweaked to make what we need. Or if anyone knows of an easy way to make a basic interface that would definitely be helpful.

Any input would be greatly appreciated.
Thanks

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

More
28 Mar 2019 21:15 #129858 by Mike_Eitel
For the software go with codesys a pi license is ca 50€. Doubt you can find anything better.
HW side I have no glue wether Mesa have an interface. There are guys from pixtend that do some hw that fits to codesys. But again no glue if they support the motion part in codesys.
All depending how many machines and how "professional" you decide to be.

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

More
28 Mar 2019 21:47 #129865 by Badger
You may want to check out Velocio.net, they have some pretty clever PLCs and interfaces that may do what you need.

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

More
29 Mar 2019 07:36 #129885 by pl7i92
there is no need to hanle with HAL on this CASE
a simpel LOGIC 60USD will drive your need
its like classic ladder /SPS

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

More
29 Mar 2019 16:24 #129906 by andypugh

I also figured there might be people here who might know of other solutions or be able to make suggestions outside of that option.
We are currently considering a couple other options. I am looking into raspberry pi options. I am not very familiar with pi in this type of application so I am researching it more now.

An Arduino might be enough, or possibly one of the higher-powered Arduino-like devices that can be programmed the same way. These come with CircuitPython pre-installed so might be a good choice. (But I can't advise, i have only used in bare-metal mode like an Arduino)


I also have a friend who has labview and we are looking into this option with PLC controllers and such but I believe it will be many times more expensive than either of the other two options.

If LinuxCNC / HAL is excessive then LabVIEW is even more so.

Here is an example of something using an Arduino and a TFT touch-screen that might fit your application.
hackaday.com/2019/03/28/put-an-arduino-enigma-in-your-pocket/

Though I have to admit that as I already understand HAL and can build Glade screens and interface to Mesa cards I might be tempted to use that set of parts running on Pi or Beaglebone or small-format PC.

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

More
29 Mar 2019 22:32 #129930 by cmorley
I think you need to answer some criteria priorities first:

Price
availability of replacement parts in the future
Ability to change things as you like.
reliability
who has to be able to fix it
how much time to invest in getting it running.

If you have to time to invest, linuxcnc sounds about right for this project.
HAL and python should cover the programming part.
GladeVCP would cover the screen part.
Analog sensors make the interface hardware a little more expensive as you can't just use the parallel port.

my 2 cents
Chris M

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

More
30 Mar 2019 00:54 #129945 by tommylight
There are 2 analogue inputs ( at least ) on every computer, namely the sound card has 4 but 2 for microphone are way to sensitive, so unusable for anything really, while the Line In can be used nicely. I used it as an oscilloscope for quite some time, It does need a divider on the input depending on what voltage you are measuring, and i have no clue how to implement that in Linuxcnc.

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

More
30 Mar 2019 18:46 #129986 by yoshimitsuspeed
Thanks for all the input everyone. It's greatly appreciated and has definitely helped.

Mike_Eitel
Thanks for the recommendation. codesys definitely looks interesting and it does look like the pi version would do what we need. Unfortunately looking on their forums on subjects related to stepper control and a few other things I found most posts didn't have any replies. Many others didn't really seem to come to resolution. Cost is important but so is time and ease. I will probably contact them and see if they offer any official support with the pi version. If so that could make it a little more tempting just in case we got stuck.

Badger
Velocio.net looks pretty promising as well. I will have to look into this a little more.

andypugh
I am still kind of interested in this route. Partially because even though I am not knowledgeable on much of the back end side of things it still feels closer to home to me. Seems like a lifetime ago I was messing with other PLC/HMI stuff and even then I was more on the hardware side.
Would it be possible for you to give me some sense of what we would be getting into if we went the route of Mesa/HAL/Glade?
Like how much work, what kind of work, what we would need to know?
It's possible I might be able to scrape up a some money if we found someone interested in consulting or assisting if we felt it was the right path forward.

cmorley
Right now it would be for a prototype and kind of a tight deadline. So speed and ease of getting it up and running, and it's ability to change quickly such as possibly adding other motors, sensors, etc and generally hopefully without ordering parts and waiting for them to get here. These are all pretty high priority. Cost is a factor but if the $400 option meets the above goals much better than the $50 option then that's a no brainer for us. On the other hand if a $1200 option is only marginally better than the $50 option then again that would be a pretty easy decision.
If this ends up becoming a production machine I wouldn't be the least bit surprised nor opposed to building another system better suited to production. It would be awesome if we don't have to but it wouldn't be the end of the world if we did.

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

More
31 Mar 2019 10:47 #130023 by Mike_Eitel
Have a look to the pixtend hw for Raspberry and codesys.
From the handbook of version pixtend 2s a cutout that describes the usage of 4 steppers.

4.1.2.4.4 Frequency-Mode
Im Frequency-Mode enthalten die Bytes PWM0XL und PWM0XH ein zusammengehöriges 16 Bit Datenwort. Dieses Datenwort wird für die Einstellung der Frequenz des jeweiligen Kanals verwendet. Der Duty-Cycle ist für Kanal A und B immer 50% und kann nicht sein verändert werden. Der Modus eignet sich dann optimal, wenn möglichst viele unterschiedliche Frequenzen benötigt werden, der Duty-Cycle aber keine Rolle spielt. Dies ist beispielweise der Fall, wenn mit den PWM-Kanälen Schrittmotortreiber angesteuert werden, die lediglich auf Signalflanken reagieren und keinen variablen Duty-Cycle benötigen. So kann mit PiXtend die Geschwindigkeit von bis zu vier Schrittmotoren gesteuert werden (2x 16 Bit PWM0X, 2x 8 Bit PWM1X).

As you seem familiar with plc's I would give the boss of www.pixtend.de a call and ask him if there is a way to use their board with steppers in codesys. Doubt that you will be faster with any soft when there are existing modules for 61131.
m5c
Mike

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

More
01 Apr 2019 13:25 #130094 by andypugh

andypugh
I am still kind of interested in this route. Partially because even though I am not knowledgeable on much of the back end side of things it still feels closer to home to me. Seems like a lifetime ago I was messing with other PLC/HMI stuff and even then I was more on the hardware side.
Would it be possible for you to give me some sense of what we would be getting into if we went the route of Mesa/HAL/Glade?


You would need to make a GladeVCP as a standalone window:
linuxcnc.org/docs/2.7/html/gui/gladevcp.html
The various controls (if you use the special LinuxCNC ones) automatically create HAL pins that pass the values in to HAL.
Then you would link those to the sensors / actuators in a HAL file.
The HAL file would first load the GUI, (A "loadusr" command, then load the various hardware drivers.

I think you can probably make a HAL file executable. But I have never tried it. (#! /usr/bin/halrun ). I will try to remember to give it a try tomorrow.

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

Time to create page: 0.095 seconds
Powered by Kunena Forum