LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need advice on proper structure - Monitoring 2 Panels independently LabView 2017

Solved!
Go to solution

I have been tasked with creating a LabView project to monitor and record test data on our process stand. My expertise is in databases not LabView unfortunately but I am learning.

 

We have two panels, Alpha and Beta each runs independently of the other. The Engineers have designed and built the panels and set up the 3rd party software that runs the controllers. My job is to create a project that monitors the controllers and writes the data to our SQL server.

 

I started with a single panel and managed to get it to run sequentially (see photo 2) its not pretty but it works.

My delema is that now I have to add the second panel.

 

I need the program to treat each panel separately, either panel may be in use or both at the same time.

 

So basically I need to have it run sequentially and parallel?SinglePanelFront.pngSinglePanelSequencial.png2PanelAttempt.png

 

 I have not attached the Vi's because they are not complete and would most likely cause an error if run.

 

Any advice would be appreciated. 🙂

0 Kudos
Message 1 of 8
(1,768 Views)

@Avoraightu wrote:

 I have not attached the Vi's because they are not complete and would most likely cause an error if run.

Any advice would be appreciated. 🙂


We can analyze VIs much easier than pictures, even if they are not runnable. You posted a couple of code pictures without even telling us what's what. We cannot tell what's going into the shift registers on the right. We cannot tell the mechanical action of booleans. We cannot tell what's in the other case of case structures, etc.

 

So, who wrote these VIs? They are in many ways Rube Goldberg code. and could be dramatically simplified. They don't follow any established coding guidelines, but are just a linear worm instead of a proper state machine. So the top image starts out in a wait loop that can never be reached again once the program runs, then we have a 1 iteration FOR loop which is basically a glorified (and unnecessary) sequence structure combined with a built array on the string. (Or a built array on the reference and error in the lower picture). An array with a single element does not need to be an array and can trip you up if it would ever autoindex on a loop. A single format into string with multiple inputs and one format statement could replace all these string concatenations. Later, you don't need to wire N=4 when autoindexing on an array with four elements. And No, a simple four output "index array" should not be replaced by the "array to cluster...unbundle" dance. That's just wrong! Why are wires going in all directions? The rest of the code is truncated so we cannot comment further.

 

Which one is "photo 2"? (They are not labeled). Can you explain what you mean by "panel"? Did you combine  the contents of two front panels into one VI? Should each have it's own window?

0 Kudos
Message 2 of 8
(1,703 Views)

Thanks for the reply, sorry I didn't get back I've been on holidays.

Lets start from the basics, the "panels" I mention are used to control the output of a heating element during a 15 hour manufacturing process.

 

Each panel has two temperature controllers as well as inputs and outputs for monitoring the process. The controllers are programmed through 3rd party software (Eurotherm Itools).

 

My task is to monitor the 15 hour process and write the results to our SQL Server.

I wrote the major vi's in this application however I am new to LabView, I normally use VB in a database setting ( that is why I was given this task).

 

The application has to be able to do the following:

  • Each panel needs to be started/stopped independently of the other. In some cases only 1 panel will be used.
  • There are certain events that I only want to happen once during the process, for example I want to read the serial number and heater # and then write it to the database.
  • I need to closely monitor the first 2 hours of the process so we will be taking enough temperature measurements to create a decent chart. Then those measurements need to be written to the database.
  • Finally at the end of the process I need to make some final calculations and them write those as well. 

 

0 Kudos
Message 3 of 8
(1,621 Views)

I'm not sure if it is better to try and run both panels through the same vi or run 2 instances of the same vi? basically the process is the same for both. I have attached a simple diagram to show the order of events.

0 Kudos
Message 4 of 8
(1,608 Views)

@Avoraightu wrote:

I'm not sure if it is better to try and run both panels through the same vi or run 2 instances of the same vi? basically the process is the same for both.


So what is different between the two panels? And at any point, do they need to communicate with each other?

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 5 of 8
(1,600 Views)

There is no difference between the two, another way of looking at is that they are two different stations that do the same thing. Some days you may use panel A, some days panel B or some days both. They do not communicate with each other but they will both be run on the same PC so I'm not sure which method will be more efficient.

0 Kudos
Message 6 of 8
(1,592 Views)
Solution
Accepted by topic author Avoraightu

This might be your best bet then. As a bonus, if you do it like this, you can run as many panels as your machine can handle.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NY8SAM&l=en-US

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 7 of 8
(1,589 Views)

I think this would probably help me quite a bit, I will concentrate on making the vi work sequentially.

 

It is possible that more panels could be added in the future, so this would avoid having to redo everything.

 

I will also look in to some of the other comments made 🙂

 

0 Kudos
Message 8 of 8
(1,561 Views)