Jump to content

Help Required


Recommended Posts

:headbang:

Help!!!

I'm a complete novice with LabVIEW and have been thrown in at the deep end. I have to have a project ready for a college course in ten days time and have no idea where to start. What I am trying to do is automate a water softener system, which I have been told is not all that difficult to do, but to me, I may as well be climbing the north face of everest in shorts and flip-flops....

Is there anyone that can point me in the right direction?.... I am using LabVIEW 8, and have a Hytek iUSB Daq. The water softener has a flow meter, and is basically a timer set to run a motor once a day, which regenerates the softener media. I would like to run the whole process through LabVIEW, and possibly include a ph meter so that the system would only regenerate when needed, so as to save salt etc.,

If anyone can help, please drop me a reply!

Thanks,

Ronan.

:question: :lightbulb: :question:

Link to comment

Offering help on this scale over discussion forum would be a tall order. I doubt that the LAVA folks are going to be able to help much, not because we're unwilling to help but because there's really no way to just teach LV over the discussion forums. Isn't there anyone who knows LV in your physical vicinity who might be able to help you? We're going to be more able to comment on a particular block diagram or a proposed VI hierarchy, but at this stage of your project, your question is sort of like landing on a new planet and asking us to brainstorm all the possible constellations from the stars in the sky. Too much space to cover and no clear place to begin. But if you get to the point where you have studied the stars in the heavens and are ready to propose a set of constellations, we can kibitz on that as to whether the constellations are recognizable and how well they reflect the LV mythology. (Have I stretched this metaphor too far? Perhaps, but you get the ... ahem ... picture, I hope.)

Link to comment

QUOTE(ronanmcc @ Aug 26 2007, 12:18 PM)

I know its a tall order...... But I'm Desperate!!! :wacko: .... If anyone knows of the Vi's that come with the hytek unit, I reckon they might be able to tell me at least which of them to use, and how to incorporate them!.... btw, good metaphor!

Ok, Mr. Desparate. 99% of the folk here will scoff at your idea because they have all but forgotten how it feels to reap the benefits of ones own procrastination.

Also you'll get lots of blowback about how you just can't learn LV in 10 days. I agree w/ them but I would rather get you by now w/ some over the top guidance on my behalf to get you to pass a project which I'm assuming that you're not the only one on.

Anyways, if no one helped you, you would become one of those ppl who go on for verses about how LV is too hard to do anything.

SO, that being said, ~,~The Captain accepts your challenge.

So to start, put together a front panel display of what you want your end product to look like. No code.

This picture along with a description of what you want to do may get us down the right track.

Keep in mind, that the better you put together this front panel, the easier it will be to understand what your objectives and priorites are.

Let the games begin!

Link to comment

QUOTE(ronanmcc @ Aug 26 2007, 06:08 PM)

:headbang:

Help!!!

I'm a complete novice with LabVIEW and have been thrown in at the deep end. I have to have a project ready for a college course in ten days time and have no idea where to start. What I am trying to do is automate a water softener system, which I have been told is not all that difficult to do, but to me, I may as well be climbing the north face of everest in shorts and flip-flops....

Is there anyone that can point me in the right direction?.... I am using LabVIEW 8, and have a Hytek iUSB Daq. The water softener has a flow meter, and is basically a timer set to run a motor once a day, which regenerates the softener media. I would like to run the whole process through LabVIEW, and possibly include a ph meter so that the system would only regenerate when needed, so as to save salt etc.,

If anyone can help, please drop me a reply!

Thanks,

Ronan.

:question: :lightbulb: :question:

Do the introduction to labview outlined in the labview manuals.

Fot the motor part, use a Digital Out and possibly need a relay to route the voltage to the motor. Checkout the example VIs for DO for the HYtek module. A while loop

and sequence and wait, you are there...

Next check the examples for Analog In for the flow and pH-meter, check the electrical out on these sensor to check if you can connect them directly to your Hytek module.

Link to comment

Hello ronanmcc,

Calm down, you will find out some clues what to do... :rolleyes:

I think there are few steps to straighten out:

1. Figure out what sensors need to connect to HYTEK iUSBDAQ analog inputs and what connect to digital Input and digital outputs.

2. Have you installed the iUSBDAQ device yet? If not, please download the driver and software here (download the full installation recommended):

http://www.hytekautomation.com/iDAQDownload.html

Make sure you install the device driver properly (you should get an installation guide with the package, if not, refer to the user manual).

3. After the device is installed, I recommend you to test it out with HYTEK ready to run software (iDAQTest&Log software) first before you jump in programming your own, because this way, at least you will get the feeling what sensors need to connect to what channels and what values you can read from the sensors and how the DIO ports react etc. with the existing software. Then you can automate the process with your own programming.

4. Since you are new to LabVIEW, I recommend you to look at the LabVIEW examples that come with iUSBDAQ, every function in iUSBDAQ has a LabVIEW example, so it should be very easy to start with. Maybe after you look at the examples, everything will become clear and make sense. The LabVIEW LLB is included in the full installation.

If you have questions, ask here again.

Irene

Link to comment

:)

Thanks for the positive comments everyone!!!... It's true!.... there are some good people left in the world!

Norm, I'm just getting a front panel together, as soon as I have it done, I'll let you know, and as I have already said, all assistance greatfully accepted.

Irene, I have already downloaded the Hytek drivers, and I assume I have them installed correctly, the latest version released in July seems to be working perfectly for me.

Looks like I'm in for a few late nights!

Thanks again!

Ronan.

:worship:

Link to comment

Hey Norm!...

Hope all is well with you.

I've spent the last couple of days staring into the innards of a water softener and trying to figure out exactly what it is I need to do.... I now have a rather astounding pile of pieces stacked up on the kitchen table, much to the delight of my wife!

From what I can gather the unit is very simplistic in its operation, set the timer, the water hardness, and it perfoms its duty at a particular time of day, whether it needs to or not. My plan is to include a water flow meter (vane and magnet unit) to assess the exact water usage, and a ph sensor to read the exact ph level (would only need to be done once a day). given these 2 pieces of information, it should be possible that the softener only operates when it absolutely needs to, in so doing, saving water and energy..... well thats my theory, and I'm sticking to it!

I have included a basic front panel design..... I think it more or less speaks for itself. the Status box would be just used to display what is happening at the present time, and the regenerate button is just a system override, to make the unit operate immediately. The 2 graphs are total water usage over the past 24 hours, linked to the flow meter so as to give an exact breakdown of when the water is being used etc., and the ph graph is a collation of the last 20 readings from the ph sensor. The time to regeneration window is letting the user know the approximate time until the unit next regenerates. The only output from the system is to a motor which drives a cam and has a position swich attached.

If at all possible, I'd be eternally greatful if you could send me on the right road with this, or tell me if I'm being completely un-realistic about the possibilities....

yours,

Ronan

:rolleyes:

http://forums.lavag.org/index.php?act=attach&type=post&id=6787

Link to comment

Hello Ronanmcc,

Have you figured out how to setup or connect your system to the USB DAQ? It does not matter which brand or model USB DAQ you are using, you still have to do this step, no USB DAQ will tell you what sensors you want to connect, so the front end setup you need to figure out first before trying to do any programming, which is actual an easier part once you setup and understand your system.

Please do connect your sensors, motor and DIO first to the USB DAQ, then you can use iDAQTest&Log software, this is ready to run data logging software (should be better than VI logger:-)), you can read analog readings right the way and setup digital IO directions and read the digital IO status, turn on PWM outputs etc. By using this software, you can at least understand how your system will work before trying to automate the procedure. I will download your vi and take a look what you trying to do.

QUOTE(NormKirchner @ Aug 28 2007, 10:12 PM)

When it really comes down to it, you should investigate Signal Express. YES!! this is it. Definetly! This is exactly what you need. Can you get your hands on a copy of it? This will make all of our lives much easier... well maybe. But I'm sure that you'll get going quicker if you can use it.

I know if you were using NI products it would be even easier, but maybe Irene can speak to this. (Irene, if you haven't I would strongly suggest talking to your NI rep to get on the signal express beta/partner group)

I am not sure if Signal Express vi will help him to automate his procedure at all, but rather than turning him into a "fool"? (sorry, I don't mean Ronanmcc a fool). I just think it's like teaching a grade one student to use a calculator, so that he maybe finish his homework faster, but never learn anything. After all the calculator will not help him to map the relationship of all the values....

The iUSBDAQ data acquisition vis are not complicated at all and I don't think this is the real problem where Ronanmcc is stuck with. I think as I said above, Ronanmcc needs first to test out his system manually first (maybe he did), if so, Ronanmcc, can you write some pseudo code with the expected data and range, like if value A at analog channel 1 goes beyond B, then turn on digital IO line 1 etc.? That is more important than doing actual LabVIEW programming.

Hope you have more information for us, Ronanmcc.

Irene

Link to comment

Hi Irene,

I have figured out the DAQ, working nicely with Test & Log, but I now need to sort out timing issues. As I said already the motor has a cam attached which makes a switch at various satages around its circumference, I just need to figure out how long it idles in each position. I think I may have a faulty flow meter aswell, but will be sorting that out today. What I am planning on doing with the ph sensor is having a virtual sensor, ie. inject a signal at the required level as opposed to actually having a sensor, as the actual unit is rather expensive, so essentially I'll be taking an output from the DAQ (pwm???) and sending it back in through one of the analogue inputs. The motor output will just be feeding a relay, as the motor is a 24v ac unit. As soon as I sort out iming issues, I'll get back to you.

Thanks! :rolleyes:

QUOTE(NormKirchner @ Aug 29 2007, 03:12 AM)

When it really comes down to it, you should investigate Signal Express. YES!! this is it. Definetly! This is exactly what you need. Can you get your hands on a copy of it? This will make all of our lives much easier... well maybe. But I'm sure that you'll get going quicker if you can use it.

Have to use LV!.....

To be honest, the project does not have to be terribly stable, just as long as it holds up to a one time scrutiny! So, I dont really have to go into too much depth!, The set up will have to work.... (in theory)... but most marks are going for write up etc...

Hope this will make things a bit easier!

Ronan.

Link to comment

Hi guys....

Sorry its taken me so long to get back!.... I've been trying to track down a flow sensor, with very little luck! I've come to an arrangement with my tutor that he will allow me to inject both signals, the ph, and the flow, and just prove that the system works as described.

so Irene, if at all possible, I'd like if you could assist me in the use of the usbdaq, tell me how to read the signals, and if possible, can I also generate the required signals with the unit??? the ph reading is on a scale of 0 to 14, so I'm assuming that I could use a variable voltage on an analogue input, and just regulate this to give various readings?, for the flow sensor, generally they use a pulse output, so again, should I use a counter or a digital input?

The output will be driving a 5 volt relay, which will be switching a motor, attached to a cam gear which has a position switch attached. The unit operates as follows, when the unit is idle, the position switch reads low. when it recieves the signal to operate, the motor rotates until the switch comes low again(I'm assuming that it works on the trailing edge), it then pauses for 6 minutes in this position, rotates until next trailing edge, pauses for 1 hour 10 minutes, rotates, pauses 1 minute, rotates pauses 1 minute again, and finally rotates to home position.

in brief:-

*START*

Rotate to first trailing edge, pause 6 minutes.

Rotate to trailing edge, pause 1 hour 10 minutes

Rotate to trailing edge, pause 1 minute.

Rotate to trailing edge, pause 1 minute.

Rotate to trailing edge, End.

*STOP*

Norm?..... What do you reckon in your expert opinion??? Can you tell me what to connect and where to connect it???.......... I'm really getting fed up of the late nights!

yours,

Ronan. :throwpc:

If anyone wants to mail me, its ronanmcc@gmail.com

Link to comment
  • 2 weeks later...

QUOTE(ronanmcc @ Sep 4 2007, 07:44 PM)

Hi guys....

Sorry its taken me so long to get back!.... I've been trying to track down a flow sensor, with very little luck! I've come to an arrangement with my tutor that he will allow me to inject both signals, the ph, and the flow, and just prove that the system works as described.

so Irene, if at all possible, I'd like if you could assist me in the use of the usbdaq, tell me how to read the signals, and if possible, can I also generate the required signals with the unit??? the ph reading is on a scale of 0 to 14, so I'm assuming that I could use a variable voltage on an analogue input, and just regulate this to give various readings?, for the flow sensor, generally they use a pulse output, so again, should I use a counter or a digital input?

The output will be driving a 5 volt relay, which will be switching a motor, attached to a cam gear which has a position switch attached. The unit operates as follows, when the unit is idle, the position switch reads low. when it recieves the signal to operate, the motor rotates until the switch comes low again(I'm assuming that it works on the trailing edge), it then pauses for 6 minutes in this position, rotates until next trailing edge, pauses for 1 hour 10 minutes, rotates, pauses 1 minute, rotates pauses 1 minute again, and finally rotates to home position.

in brief:-

*START*

Rotate to first trailing edge, pause 6 minutes.

Rotate to trailing edge, pause 1 hour 10 minutes

Rotate to trailing edge, pause 1 minute.

Rotate to trailing edge, pause 1 minute.

Rotate to trailing edge, End.

*STOP*

Norm?..... What do you reckon in your expert opinion??? Can you tell me what to connect and where to connect it???.......... I'm really getting fed up of the late nights!

yours,

Ronan. :throwpc:

If anyone wants to mail me, its ronanmcc@gmail.com

Hello Ronan,

I am not familiar with your project and sensors that you want to use. But I can help you with iUSBDAQ. Yes, you can read analog inputs (voltages from 0 - 4.096V), then convert to your PH value, but you must find out what is your maximum output voltage from PH sensor when it is value 14 so that you can get the scaling of PH value per voltage and I assume the pH sensor is linear. After you get the scale of PH sensor, you can convert each voltage reading value to actual PH value.

Regarding the flow sensor, using the counter in iUSBDAQ you can count how many pulses your flow sensor outputs.

For controlling the motor, I think you can use a digital output line to turn the switch on and off. Say you configure the DIO1 as output (you can leave the rest DIOs as inputs as default), whenever you turn this DIO1 line from on to off (trailing edge), the motor will run and turning the cam gear. When you set DIO1 off to on (low state to high state), your motor will stop.

Please open up iUSBDAQ_All_Vis.vi, go to block diagram, you will see many examples from reading analog inputs, counter and read/write DIOs.

As I always recommended, have you tried out the iDAQTest&Log software, at least to prove your system will work? Because with iDAQTest&Log software, you can read analog inputs, this way you can map the voltage value to your actual PH value. Also you can try out turn DIO line on and off to see your motor running and also read the flow sensor pulses with the counter.

Below are some tips for you:

If you connect your switch to DIO1, then you can use below translation

*START*

Rotate to first trailing edge, pause 6 minutes. --- Set DIO1 as output and write a High state to DIO1 for ??ms, then write a low state to DIO1 line for 6 minutes, then write a high state to DIO1 again to stop the motor.

Rotate to trailing edge, pause 1 hour 10 minutes. Same step as above, but set the DIO1 line to low state for 1 hour and 10 minutes.

Rotate to trailing edge, pause 1 minute. Save step as above, but DIO1 stay at low for 1 minute.

Rotate to trailing edge, pause 1 minute. Again, same as above wit 1 minute time.

Rotate to trailing edge, End. Again, same until you set the DIO1 line high to stop the motor running.

*STOP*

I guess while you turning the motor, you also want to read analog input (for PH value) as well as flow sensor (counter value). Once you look at the examples, all these tasks should be easy.

If you can code up some LabVIEW code and post here, I think we can help you further.

Irene

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.