LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

There must be a better way of doing this

Solved!
Go to solution

Each digital channel will show the pass/fail for a separate battery. So i need to see if all of the channels passed/failed not just one.

 

CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 41 of 46
(912 Views)

OK I made a few changes. I had to rework the DO loop setup. There was a lot of stuuf that we did not need and I made it a little easier. I added event registration to the code so that we can send an event to tell the digital loop when to take data. I changed the digital loop into a state machine to accomodate the event call.

 

 

Take a look and let me know what you think. If you do not understand let me know and I will try and explain.

Tim
GHSP
Message 42 of 46
(897 Views)

Hi Aeastet,

 

Yeah, i'm having a bit of trouble seeing what's going on now! Smiley Happy Could you go through the steps?

 

In the meantime though, i've had a crack at trying to record on which test (if any) the battery fails.

 

Chris

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 43 of 46
(871 Views)

What part do you not understand? I can go through it if I know what you are having trouble with.

 

 

I took a look at the code you sent. I have a few suggestions. You put the digital and analog channels back together again. The is not good we had those separated for a reason. You need to leave those in their separate loops. I would handle the failure in the consumer loop on in either of the producer loops. I think I would make a sub vi that looks for a failure with the criteria that you want and then integrate it into the consumer loop with a true false output. We can take that output and make it log a failure. As far as the failure goes I saw that you asked about having a failure in test 3 iteration 13 and weather it would overwrite in test 4 iteration 13. This depends on how the log is coded. You can have it log failures for every iteration or you can have it overwrite failures when there are failure. It will depend on what you want to do with it.

Tim
GHSP
Message 44 of 46
(862 Views)

Haha, i see i left a big chunk of text out of my last post explaining where i was having trouble! sorry about that!

 

Before i ask specific questions about the user events etc. I've put together the program using your advice (putting the log data into the producer loop).

 

If i make the timing for the task set up.VIs in the "analog producer loop" the same for both VIs, then will the case structure i've put in, create the necessary separation of the voltage analog channels? ie record the datapoints when test 3 is running, then swap to the other array when test 4 is running.

 

At the moment i would like to keep the program as simple as possible, otherwise i won't be able to troubleshoot it when the time comes to test it!!

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 45 of 46
(849 Views)

OK what you did looks good. It will give you what you want I think. I do not have the report generation toolkit so I am not sure what you are doing with word other than what is connected with words. I am going to have to let you set that part up. Did you get a chance to run it on the machine and see what happens yet?

Tim
GHSP
0 Kudos
Message 46 of 46
(842 Views)