LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to monitor multiple flow meters

I've been working with LabVIEW part time for about a year.  I completed Core1 training last year.  I neeed suggestions on building a VI to monitor several flow meters at one time.  I've been successful at building a VI to monitor one flow meter but I don't know how to make it so that I can monitor several at the same time.  I could have any combiniation of one to twelve flow meters being used at any given time.  Ideally I would like a user to be able to select which flow meters are in use before running the VI.

 

I have an NI cDAQ 9184 with three NI 9203 current modules.  I have these modules connected to twelve ifm efector SM6004 flow meters.  These are actually dual 4-20mA outputs, one output is for water flow and the other is for water temperature.  Because of this, I can only run 4 meters per 9203 module.

 

I would like small, seperate graphs for temp and flow.  With up to 12 flow meters, the computer screen would get cluttered.  I thought about running each flow meter on seperate tabs but got errors the first time I tried this.

 

Any suggestions are greatly appreciated.  

 

 

0 Kudos
Message 1 of 13
(4,121 Views)

Hi doughein,

 

If you can post your first attempt, it may go a long way in showing people what you're working with (and the errors you got may be familiar to someone!).

 

You may want to make a VI with re-entrant execution to interface with the flow meter. When you launch this VI (or a new instance of it) you can also create a queue (to send data to the VI) and user event(s) (to broadcast data from the VI). The DQMH (Delacor Queued Message Handler) makes working with these VIs (called cloneable modules) easier, so have a look at downloading that from the VI package manager if you like.

0 Kudos
Message 2 of 13
(4,112 Views)
Have you tried creating a single task with all three 9203 modules and 12 channels? I'm not that familiar with the hardware but I thought that's was possible. You can certainly create 3 different tasks with 4 channels each if not.
0 Kudos
Message 3 of 13
(4,102 Views)

Here is my VI that is functional with one flow meter.  This is a modiffied version of a sample that I found on the NI website.   On the front panel, there are two additonal tabs but they are blank on this version.

0 Kudos
Message 4 of 13
(4,091 Views)

And here is my next version that is not functional.  Basically all I did was make a copy of everthing on the block diagram but change channel settings for the 2nd flow meter. I added all visible items on the front panel for the second meter to the second tab.

 

When I run it, I get:

 

Error -50103 occurred at DAQmx Start Task.vi:7220002

 

Possible reason(s):

The specified resource is reserved. The operation could not be completed as specified.

 

Task Name: _unnamedTask<1>

0 Kudos
Message 5 of 13
(4,081 Views)

Thank you gregoryj.  I'm not familiar with DQMH at all so I'll have to look into that.

0 Kudos
Message 6 of 13
(4,077 Views)

If you disable Meter 1, does Meter 2 work alright?

0 Kudos
Message 7 of 13
(4,073 Views)

Thanks Dennis.  I haven't tried that route yet.  I guess I've been hung up on how to make it so that any combination of the 12 meters can be monitored (and data logged) rather than have them all going at the same time.

 

FYI, each of the modules has 8 inputs channels.  My meters are dual output so that's why I can only run 4 meters on each module.

0 Kudos
Message 8 of 13
(4,070 Views)

gregoryj

 

I forgot to mention that with both meters selected, after the error comes up, I can click on continue and one meter will work.  I not positive but it seems to be random which one works.

 

By enabling only one meter, it's pretty much the same thing.  I get a different error but if I click on continue, the VI will run with either meter 1 or meter 2 selected.  

 

Error -200088 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Sample Clock).vi:4730001->11.30.2015 Analog Input - Two meters two tabs.vi

 

Possible reason(s):

Task specified is invalid or does not exist.

0 Kudos
Message 9 of 13
(4,063 Views)

and to answer your question, yes.  Disable meter 1, and meter 2 works, after continuing after the error.

0 Kudos
Message 10 of 13
(4,057 Views)