取消
显示结果 
搜索替代 
您的意思是: 

Slave loop iterating only once

已解决!
转到解答

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 项奖励
1 条消息(共 7 条)
3,643 次查看

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 项奖励
2 条消息(共 7 条)
3,637 次查看
解答
已被主题作者 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.

3 条消息(共 7 条)
3,626 次查看

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 项奖励
4 条消息(共 7 条)
3,621 次查看

@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 项奖励
5 条消息(共 7 条)
3,549 次查看

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 项奖励
6 条消息(共 7 条)
3,539 次查看

@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 项奖励
7 条消息(共 7 条)
3,524 次查看