LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

very long timed tasks relay

Solved!
Go to solution

Dear Friends

 

I would to make a researching test to simulate a month of rain and sun.

For that I will use 2 relays, onde for open water for rain  and other for the heater (sun).

 

The student has the  days that has raining and the days that has som sun during a month.

I am thinking to teel the student to tranform that month in minutes and give me a table with the start ant stop in minutes for rain and for sun.

 

Then with a clock I will compare with that values to open and close relays. I will use a NI usb 6009.

 

Have the people from forum a simple way to do that? The problem is that is not cyclic. So I need to input the starts and stops for rain and for sun.

 

 

I thanks for any help to help me simplifying.

 

Best

cpalka

 

 

0 Kudos
Message 1 of 11
(4,465 Views)

I would make an array of cluster.  Inside of the cluster you have the state for each relay and the amount of time to stay in that state.  Then you can just use a FOR loop to autoindex on the array.  Inside of the FOR loop, you set the states of the two relays and then go into a While loop.  Inside of the While loop you have an Elapsed Time express VI that will tell you when to go to the next state.  You will want a delay of something like 100ms and a stop button inside of the While loop so that you can abort everything.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 11
(4,444 Views)

Hi Cross

 

I understand som "words" but the complete explanation no.

 

Is fificult to you doing for only one event than I explode for all events?

 

 

Sorry I am not an expert as you.

 

Thanks

CPalka

0 Kudos
Message 3 of 11
(4,409 Views)

See if this makes any sense.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(4,403 Views)

Hi Cross

 

I try to do your example, but I could not build a array of cluster.

In attach please see in front panel what I need.

 

Thanks for the help

 

cpalka

0 Kudos
Message 5 of 11
(4,362 Views)

@cpalka wrote:

I try to do your example, but I could not build a array of cluster.


First make a cluster (drop a blank cluster and then drag the relevant controls into it).  Then make an empty array and drag your cluster into it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 11
(4,358 Views)

Hi Cross

 

 

I found the cluster, but i dont find the string "settings".

Is dificult to you put your example online if it works?

 

I will appreciate.

 

Best

CPalka

0 Kudos
Message 7 of 11
(4,349 Views)

@cpalka wrote:

I found the cluster, but i dont find the string "settings".


Are you referring to a string control you want in your cluster?  You just drag a string control into your cluster.

 

Since you are apparently very new to LabVIEW, I recommend you take some of the tutorials.

3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 11
(4,335 Views)
Solution
Accepted by topic author cpalka

Hi Cross

 

 

I adpated an example tha I found and seems to be what I want. I need to add for sun cycles.

do you think it works for a month?

 

About the "apparently very new to LabVIEW", I would like that you could please understand that I do many things in labview (adapting examples, leaning new thigs etc...) but my job is in researching area and this is for a new project that I will use the NI6009.

 

Now I am fihish (with help of Nathan) a xy table from an old plotter to measure the texture of the ground and there I use the arduino + shield + labview

 

https://decibel.ni.com/content/thread/46259

 

A few months ago i need to learn working with a datalogger from datataker, another way to program.

Many times I use arduinos for small applications, another program language

 

Hoppe you can understand that all years we have a lot of students with different projects and we need to improvise to make all of them. Sometimes we use labview sometimes not. (I prefer because we have some daqs from NI), but labview is not only the tool that I need all days, i need electronics knowledge, I need mecanics knowledge, because we are always doind what were never done before and we need to improvise. and if we have money of course we pay a electronic engineer, a Labview expert, etc., etc....

I am a Civil Engineer and for serving the best I can my students I nedd people like you all days.

 

Sorry for that

 

Best

cpalka

 

0 Kudos
Message 9 of 11
(4,325 Views)
Solution
Accepted by topic author cpalka

He didn't mean to insult when suggesting you were new to LV.  Clusters are a very basic data type.  The example he provided is something you could drag onto your block diagram and get all of his code without having asked the follow up questions.  These are things you NEED to know if you're going to modify examples.

 

Otherwise, you're going to make changes without understanding the ramifications of your actions.  It's in your, and your students, best interest to take a few of those online courses to get acquianted with the programming environment.  Once you're more comfortable with the environment, it's easier to ask questions and get answers that lead you to results rather than more questions.

0 Kudos
Message 10 of 11
(4,317 Views)