LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hardware push button

Oh I realized one more thing. If I switch off the start stop button, the whole process should terminate but it's not doing that. It continues.

Could you please tell me why?

0 Kudos
Message 101 of 117
(1,107 Views)


smm wrote:

I tried them all together along with the start stop button and all that and it all works. Thanks to you guys. But I still ahven't been able to figure what to do with the unit in. I know lynn said that it's supposed to be connected to a shift register but when I connect the unit in htp the left or roght wall of the while loop, it gives me a broken line and an error saying you are connecting 2 different data types.


See attached.


smm wrote:

Also why don't the units get tested in order. As in the states run randomly for any unit instead of doing a unit 1, unit2....unit6. It runs randomly like unit6, unit3, unit4, unit5, unit2, unit1 etc.


Because the 6 units are all in parallel operation in the while loops, there is nothing dependent on one finishing before another starts.


Message Edited by Ravens Fan on 02-29-2008 09:20 AM
0 Kudos
Message 102 of 117
(1,105 Views)

Thank you. Last question...

Oh I realized one more thing. If I switch off the start stop button, the whole process should terminate but it's not doing that. It continues.

Could you please tell me why?

0 Kudos
Message 103 of 117
(1,096 Views)
The last Main VI I see that you have posted was in reply 89.  That one is not doing any reads of the Digital Stop line after the initial While Loop to wait for a start.  Why is that?  The VI you had back in Reply 77 had it.  Why did you take it out?
 
It really makes it difficult to help when you undo things that you had correct before.Smiley Mad
 
You may need to eliminate the case structure so that the boolean from the digital read is put directly into the action engine.  That way it detects both the true and false states of the switch.  Remember to leave the msec wait function so the loop doesn't run too fast.  In order to stop the program, you will have to put the front panel stop button to the stop terminal.
0 Kudos
Message 104 of 117
(1,078 Views)

I think I fixed that except when you said "In order to stop the program, you will have to put the front panel stop button to the stop terminal." What I think is, when you do this, the hard start-stop button loses it's purpose right?I don't want to have a soft start/stop button. What should I do in this case. how can i ensure that the program stops running.

Also since I have been working on this project, I have noticed that for some odd reason it works correctly only in the debug mode and not in the regular mode. If I use it in the regualr mode, it fails all the units even if they are working. Can you tell me why? I think it should work as well in regular mode as it does in debug mode. For some reason I think it is not taking the wait times into consideration. Please help. It is a little weird. Thanks.

Download All
0 Kudos
Message 105 of 117
(1,062 Views)

I got it working in the non-debug mode as well, but I still cannot fix the hard stop button in thee while loop.

Also can you tell me if it is possible to make the subvi's run in a sequence. That is unit 1 forst, then unti2, unit 3...unit6. As of now it runs arbitrarily like unit6, unit4, unit5, unit2, unit3, unit1. There is no sequence.

0 Kudos
Message 106 of 117
(1,041 Views)
Please don't set VI to run when Opened!
 
Okay.  I think what happens is that since your stop button is essentially in stop mode when the VI starts, it immediately kills the Stop button read loop in the first iteration.  You only want that loop to stop once the process has started.  There are numerous ways to work around this, some good, some better, some bad, some worse.   I put in something that should be an okay way to do this.  It uses a shift register to track whether the process has been started.  I made it based on what I assume your boolean logic is that if the DAQ read is False, that means start, and the DAQ read is True, that means Stop.  If that is wrong, then the logic will need to be reworked.
 


smm wrote:

Also can you tell me if it is possible to make the subvi's run in a sequence. That is unit 1 forst, then unti2, unit 3...unit6. As of now it runs arbitrarily like unit6, unit4, unit5, unit2, unit3, unit1. There is no sequence.



This statement is really in conflict with what I thought one of your requirements was that the 6 devices run in parallel.  It is kind of hard to have 6 things running at the same time but in sequence.Smiley Wink  How out of sequence are these things, is it case of fractions of second between one starting and the next?
 
You can set your error wires to run things in a specific order, but then your 30 second waits between each statement machine will stackup and nothing would truly be running in parallel.  And the whole test sequence would take 6 times longer.  I assume that is what you don't want.
 
If you want in sequence, but pseudo the same time, there would be a way to do this with a set of VI's that has wires between them to enforce dataflow and thus sequencing with a small wait.  I created a subVI I called Gate.  One of these would go in front of the statemachine on each rung of the ladder.  It's error wires will be in line with the error wires already there.  But the blue numeric wire will string between the 6 gates.  What should happen is that the first one will run.  After 100 msec (and you can play with that value), it finishes allowing statemachine 1 to proceed as well as the gate in front of statemachine 2.  It waits 100 msec, then allows SM2 to proceed and gate 3.
I figured 100 msec wait will appear to be simultaneous to the human eye, but will be long enough to allow the processor to get started on each statemachine in sequence.
 
I put a rough structure in on the right hand side.  You can take the time to create space in your main loop and wire them in.
 
See the attached files.
Download All
0 Kudos
Message 107 of 117
(1,033 Views)
Use this VI, not the one in the last one which just uploaded your last version.
0 Kudos
Message 108 of 117
(1,029 Views)


Ravens Fan wrote:
Please don't set VI to run when Opened!
 
  I made it based on what I assume your boolean logic is that if the DAQ read is False, that means start, and the DAQ read is True, that means Stop.  If that is wrong, then the logic will need to be reworked.

Sorry about that. Ya and it is supposed to be when the DAQ read is 1 or true it starts and when it is 0 stops, but for some reason that was not happening. So i just manipulated it to what it does. How different will the logic be if this is the case?



Ravens Fan wrote:
 
This statement is really in conflict with what I thought one of your requirements was that the 6 devices run in parallel.  It is kind of hard to have 6 things running at the same time but in sequence.Smiley Wink  How out of sequence are these things, is it case of fractions of second between one starting and the next?

I want it to run in parallel, but what has been happening is, when the VI runs each state is executed by every unit before it moves to the next state. So if it is in the heat mode lets say, then it will forst run for unit 6, then unit 1, unit4, unit3, unit 5, unit 2. So i can't get all the units to run in parallel per se. That is what I meant with they run in sequence. I would love for them to run in parallel, but that does not happen. So now I have a vi which run in a combination of serial-parallel instead of plain parallel (which is my requiremement). Because this serial-parallel combination takes forever to run. The whole vi takes close to 21 mins to execute completely. I hope I am making sense. Can you help me with this?
Thanx!

 
0 Kudos
Message 109 of 117
(1,022 Views)

Also the hard start/stop has been kind of working, but the stop inside the main while loop is not working too well. Like when the entire vi executes, it is supposed to stop executing, but th run arrow still is active which means the vi execution is not getting terminated. zThe stop in the main while loop is activated either by the hard start/stop or the output of the compund or block. But htat isnot happening. Could you please take a look. Thank you so much.

0 Kudos
Message 110 of 117
(1,016 Views)