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

Can you assemble a timed case structure?

已解决!
转到解答

Hello,

 

I have just gotten started with Labview. I watched a few videos and tutorials for the basics, but for the project I am working on, I need something similar to a timed case structure. I want to store multiple functions in different cases that time out after being executed, or after a given amount of time. Is there any functions or structures like that? 

 

This is my first time posting a question so feel free to let me know if I am doing something incorrectly.

 

 

0 项奖励
1 条消息(共 4 条)
2,825 次查看
解答
已被主题作者 Ramonk 接受

Hi Ramonk,

 

I want to store multiple functions in different cases that time out after being executed

Taking your words literally: Put a loop in each case set to run for a certain amount of time (using ElapsedTime).

 

Better approach: build a state machine…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
2 条消息(共 4 条)
2,802 次查看
解答
已被主题作者 Ramonk 接受

All you need is a simple state machine consisting of an outer loop, a case structure with the various code version, one for each case, and a state variable (e.g. enum) in a shift register. Just switch states as a function of elapsed time.

 

(Don't trap yourself inside inner loops)

3 条消息(共 4 条)
2,799 次查看

wrote:

I want to store multiple functions in different cases that time out after being executed, or after a given amount of time.


A MS Wait in each case would give each case a "timeout" (more like a duration). That's what a "timed case structure" would do (and why it doesn't exist). The function wouldn't time out, the case would.

0 项奖励
4 条消息(共 4 条)
2,745 次查看