LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slave loop iterating only once

Solved!
Go to solution

Hello,

I kept googling my problem but nothing helpful came up so hopefully someone can help me here.

I am constructing a programme to read several DAQ inputs, display them on a chart (master, faster) and write them into a file (slave, slower). The displaying and the writing are supposed to happen at different frequencies.

I adapted the set up from this thread: https://forums.ni.com/t5/LabVIEW/time-synchronization-in-producer-consumer-loop/td-p/2439936.

My problem now is that the slave (writing) loop only iterates once and then never again. Since the example from the thread works just fine and I cannot find any significant difference I am hoping someone else can spot the difference.

I already tried adding a timeout value to the notifier but that didn't help. I also tried running it without the elapsed time component but the same problem occurs. Taking the timing out of the slave loop doesn't help as well.

 

I attach my vi but please don't be shocked, it is still in testing phase and by no means cleaned up yet.

 

0 Kudos
Message 1 of 7
(2,663 Views)

After some more testing I seem to have found the problem. The slave loop iterates first after that it doesn't get data from the notifier in time and therefore executes an error which stops the loop.

So the new question is how can set the slave loop to iterate after the master?

0 Kudos
Message 2 of 7
(2,657 Views)
Solution
Accepted by topic author silhalis

Solved it..

The actual problem was in the multiple Error handling and a faulty refnum constant from an earlier case structure.

Now.. How can I close or delete a topic?.. There seems to be no button for that.

Message 3 of 7
(2,646 Views)

The best you can do is mark the solution (which did in your behalf).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 7
(2,641 Views)

@silhalis wrote:

Solved it..

The actual problem was in the multiple Error handling and a faulty refnum constant from an earlier case structure.

Now.. How can I close or delete a topic?.. There seems to be no button for that.


There is no such button.  People come here to learn and to learn from others.  How can they learn from your experience if you delete the topic?  (This forum wasn't created just for you.  ;))

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 7
(2,569 Views)

I understand that, but since there was no real discussion with different options and the solution was something completely off topic and actually unrelated to the master and slave design I thought I wouldn't really be helpful to others.

But maybe someone stumbles across a similar problem and this thread might give them new ideas to look for the error. 🙂

0 Kudos
Message 6 of 7
(2,559 Views)

@silhalis wrote:

I understand that, but since there was no real discussion with different options and the solution was something completely off topic and actually unrelated to the master and slave design I thought I wouldn't really be helpful to others.

But maybe someone stumbles across a similar problem and this thread might give them new ideas to look for the error. 🙂


🙂 You'd be surprised at how many people travel the same path and your solution, even if it seemed unrelated, solves their issue, too.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 7
(2,544 Views)