LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hardware push button

The step indicator is basically something that will tell the operator what steps to take while testing the thermostat. I amg oing to take a look at the .ctl you sent and try to understand what you are saying. If I don't understand it, I will get back to you.

As for the hard start-stop button. It is going to be only 1 button and not two. We were intitally planning a momentary start-stop button, but I thought it was difficult to program and read such quick transitions. So we thought we could use a toggle switch. We are open to using any switch (momentary or toggle).

I will test for the tasks and let you know of what errors I get this time around.

What I am doing is in 1 task reading froma ll ports port 0, 1, 2 and then I split the lines as to which I want to read. That is I unbundle them.

0 Kudos
Message 31 of 117
(1,391 Views)


Ravens Fan wrote:
I would highly recommend (and I think this was suggested before) to make each of those indicators for each test into a type def'd cluster.  (I attached one as a .ctl file in LV8.5).  You can bundle the values into the cluster inside the subVI.  Then just pass a single wire out of the subVI into the indicator of the cluster.  This will simplify wiring on your main diagram and also visually group things on your front panel.  (If you want that step string, you can add that to the cluster as well.)
But how do you exactly bundle these values in the subvi and pass the wire?
0 Kudos
Message 32 of 117
(1,390 Views)

Ravens Fan wrote:
I would highly recommend (and I think this was suggested before) to make each of those indicators for each test into a type def'd cluster.  (I attached one as a .ctl file in LV8.5).  You can bundle the values into the cluster inside the subVI.  Then just pass a single wire out of the subVI into the indicator of the cluster.  This will simplify wiring on your main diagram and also visually group things on your front panel.  (If you want that step string, you can add that to the cluster as well.)
Ok i figured what you are trying to say, but if the bundle vi is outside the main case structure in the subvi, then we get some missing tunnel assignments on wiring the indicators to the bundle vi. what should i do with that, or does the bundle vi have to be inside the case structure, though according to me that will not make any sense.
0 Kudos
Message 33 of 117
(1,386 Views)
To use clusters, use the bundle  by name and unbundle by name functions on the cluster pallette.  These are some fundamentals to know in Labview.  If you haven't taken any tutorials (I think there are 3 hour and 6 hour versions online), I would highly recommend you take them.
 
I attached a simple VI that uses that cluster to show how to unbundle to get values and how to bundle them.  (It is a meaningless example because I'm just unbundling and rebundling.)  Also how to change a couple values in a cluster.
 
Use these in your subVI.  Create a cluster indicator on the front panel of your subVI and connect a connector terminal to it.  Then you can eliminate all of those individual boolean and boolean array connectors.
0 Kudos
Message 34 of 117
(1,384 Views)
You may need to put a NOT function between the DAQmx read in the main loop and the OR function that stops the main loop.  That way a button latch or toggle switch being closed would be a digital read of True and would stop the first loop.  But you don't want that to stop the 2nd or main loop.  You want a button being unlatched or the toggle switch being opened to stop the 2nd loop which would be a False on the Read.  You need to convert that to a True with the NOT function.
0 Kudos
Message 35 of 117
(1,372 Views)

I tried to do the cluster thing for the subVI. I think I kind of did something. Do you think you could check if what I had done is correct, in terms of wiring. I wired a use default for the tunnels when I didn't have anything else to connect in any state.

Also in the cool mode, I could not connect the cool_read local variables to the cluster. Could you tell me what the problem is.

I was then trying to get rid of all the old LEDs for the items in the cluster, but it gave me all errors since all those blocks went missing. Could you please take a look at the front panel and the block diagram and tell me what to do.

0 Kudos
Message 36 of 117
(1,351 Views)
I can't tell in your subVI what you have done with a cluster at all.
 
Drop in 2 copies of that control.  Turn one into a control which will get the input information for the subVI.  The other will be an indicator which will feed out the information from the VI back to the main program.  Put the control terminal to the left of the case structure, the indicator terminal to the right.
 
Feed the cluster wire into the case statement.  In each case, use the bundle by name function to change whatever particular value of each indicator you want to change.  It will be like the example I gave a few replies ago.  Feed the cluster wire out of the case structure to the indicator terminal to the right.
 
Once you are done modified all of the cases, you will be able to eliminate all of the individual indicators.  This will allow you to clean up the connector panel of the subVI as well and make it into the preferred 4x2x2x4 pattern.
 
I have modified your subVI for a few cases (Initialize, Auto High Mode)  In Cool mode, you have some calculations duplicated and writing to the same local variable a few times even though nothing changes.
 
Also, in some of your dialog cases, you do some things that won't work the way you think they will.  You write a value to the string.  Pause a while, then write another value or empty string to the string.  You will never the first value on your front panel because the data is not sent out of the subVI until the subVI is finished running.  So you will have an 18 second plus pause with a message you will never see because the message gets cleared before the subVI finishes
0 Kudos
Message 37 of 117
(1,342 Views)
I got what you were trying to say.


Ravens Fan wrote:
  In Cool mode, you have some calculations duplicated and writing to the same local variable a few times even though nothing changes.
I'll tell u what the problem is. In case B( what you called it as duplication and case C). What I'm doing is a write to this one terminal and then reading to see the signal there. But because I used the index array vi there, I could not show continuity, which I realize now will pose a problem and will  execute that read and write together so looks like it is duplicated, but the thing is I couldn't even connect an error wire to maintain continuity there. What should I do in those cases?? The writes had to be done using MAX because i couldn't make separate tasks. One of the NI applications engineers had suggested I do that. And he recommended the reads could be done using index array.


Ravens Fan wrote:
Also, in some of your dialog cases, you do some things that won't work the way you think they will.  You write a value to the string.  Pause a while, then write another value or empty string to the string.  You will never the first value on your front panel because the data is not sent out of the subVI until the subVI is finished running.  So you will have an 18 second plus pause with a message you will never see because the message gets cleared before the subVI finishes
So how do I edit the strings then. Do you recommend I put 6 different strings?

0 Kudos
Message 38 of 117
(1,333 Views)
And abt the heat pass two... What happens is that I had that stop button right. So it's like if the unit fails the process stops. but I didn't want it to happen like, that because 1 unit fails all the 6 processes stop. So we had to put the T-F condition to handle that. So to use that as an indicator /connection I put it.
0 Kudos
Message 39 of 117
(1,328 Views)


smm wrote:
So how do I edit the strings then. Do you recommend I put 6 different strings?

I would recommend 6 different strings because you have 6 different tests.  But since you want the front panel to update in the middle of the subVI still running, you will need to do a little more complicated structure.  You will need to pass a reference of that string into the subVI.  Then in the subVI pass the reference of the string into a property node for value instead of the string indicator or local variable that is located in the subVI.  This allows the subVI to directly update the indicator on the front panel even before the subVI finishes.
0 Kudos
Message 40 of 117
(1,319 Views)