07-02-2019 03:29 AM
Hello. I need your ideas. I have a system. This system has some tools. Like pumps and sensors. The tools of the system contain data. When the system starts up, the data starts to flow, and then sends them to a hub. The hub is connected to a computer. The computer contains the Labview vi interface. Incoming data is tried to be interpreted and plotted in the labview and then transmitted back to the sensors and pump according to the new values entered. First, my goal is to be able to observe the information coming from the tools and then to input data to them. Where should I start? I need to design a system-controllable interface. You can see an example in the picture. This is an executable file that was not created by me. But I want to design the same interface. How do I do that?
Solved! Go to Solution.
07-02-2019 04:11 AM
I'd start by doing some courses.
Making that interface seems pretty basic. Put Booleans, graphs, and other controls and indicators on a FP. If it needs to be exactly the same, you could probably use VI server to get coordinates, colors, labels, etc. from the executable.
07-02-2019 04:29 AM
I must go step by step before the interface creation. Can you show me an example link where I can save data from sensor and hub?
07-02-2019 05:28 AM
I'd echo what Wiebe said, and suggest reading/watching some of the learning materials available at the top of this forum, or via the online courses (if you have SSP, the subscription package for your licence).
With regards to your question more specifically, to acquire some data, the method depends on the sensor. The image you showed contains the phrase "COM error", which suggests that perhaps you'll need to use the VISA nodes for an RS-232 or similar communication method.
You can find examples showing some typical code for that type of system by opening the Example Finder (under the Help menu, Find Examples...) and searching for "VISA". Note that in many cases (perhaps all? I suppose there are some standard commands, but generally you want more than that) you'll need to consult the manual of the sensor to find out what commands it accepts, in what format, and how it returns data (and again, the format).
07-02-2019 05:44 AM
@bestecf wrote:
I must go step by step before the interface creation. Can you show me an example link where I can save data from sensor and hub?
There are a million ways to do that. The critical parts are the storage format and the data format. So those need to be clear first.
07-02-2019 10:02 AM
@cbutcher wrote:
I'd echo what Wiebe said, and suggest reading/watching some of the learning materials available at the top of this forum, or via the online courses (if you have SSP, the subscription package for your licence).
With regards to your question more specifically, to acquire some data, the method depends on the sensor. The image you showed contains the phrase "COM error", which suggests that perhaps you'll need to use the VISA nodes for an RS-232 or similar communication method.
You can find examples showing some typical code for that type of system by opening the Example Finder (under the Help menu, Find Examples...) and searching for "VISA". Note that in many cases (perhaps all? I suppose there are some standard commands, but generally you want more than that) you'll need to consult the manual of the sensor to find out what commands it accepts, in what format, and how it returns data (and again, the format).
Also, my hub is in website. https://www.aten.com/global/en/products/usb-&-thunderbolt/usb-converters/uc2324/
07-02-2019 03:46 PM
The hub is not really relevant. It's just a USB to serial port converter. The important part is what kind of instruments will be communicating through it, what commands they can receive and what data they will transmit back. Then, you'll have to decide how to store and process that data in LabVIEW. Of course the MAIN thing is what you are actually trying to accomplish with those devices. Monitor pressure in tanks? Temperatures in an oven? Without that info we can't give you much advice.
Generally for apps like this you want to use a state machine architecture. You start by initializing and configuring your hardware, then loop continuously while you poll the devices pulling in data. You analyze the incoming data and then send commands back to the instruments depending on your particular applications purpose. Again, since we don't know that purpose (except that it appears industrial) we can't give specific advice.
I suspect this is schoolwork??? If so, give us whatever details you can and we will try to guide you to a solution.
07-03-2019 02:42 AM
@NIquist wrote:
Generally for apps like this you want to use a state machine architecture.
SMs are the beginners gateway architecture. It is a good step-in technique. You should know everything about them of course, if you want to be a professional LV programmer.
At some point, you probably want to switch to something else. This also depends on the type of application(s) you make, and other factors.
I haven't done a SM in years...
07-03-2019 10:04 AM
wiebe@CARYA wrote:
I haven't done a SM in years...
I am envious, I rarely use anything else professionally although I do like the Actor Framework when playing around on my home edition. I wish I was surrounded by LabVIEW savvy co-workers but I have to keep my code easy to modify and upgrade by a whole range of engineers and noob programmers. Most of them find even basic LV OOP confusing and clunky compared to Python, C#, Java, etc. and the AF makes their heads explode (still hurts my brain sometimes too). Sooo, I stick with the basic SM passing around big clusters and maybe use a few Action Engines. At least it's better than the 10 - 20 year old, giant stacked sequence structure monstrosities I'm re-factoring.
07-03-2019 10:36 AM
@NIquist wrote:
wiebe@CARYA wrote:
I haven't done a SM in years...
Sooo, I stick with the basic SM passing around big clusters and maybe use a few Action Engines. At least it's better than the 10 - 20 year old, giant stacked sequence structure monstrosities I'm re-factoring.
SMs great for some applications. I usually have a while loop with an event structure as basis.