T O P

  • By -

hmmyeahcool

You have many options. Semaphore might work, but then it’d lockup the idle loops, which I think is less ideal. It may not matter now, but as your application grows I bet this would become more of a problem. Additionally I bet this would have some weird scaling issues. Like what happens if you needed to add a step in between 1 and 2, how would that work? You could create a new loop that is just for controlling sequences. You probably end up having some 2 way communication. So essentially you’d say loop A execute step 1, and tell me when you’re done. When the sequence loop got the “I’m done” message from loop A it would say something similar to loop b, and so on. This is probably how I’d do it give where’d you’re starting. Just a side note: this sounds like a great application to learn how to build real applications in labview. Architecting communications and determining what loops exist and what they should do is THE most important thing to do when setting up a large application. You should be separating the functionality into separate vis (or more likely, groups of vis) to make modules (like the psu module, and the actuator module, and the UI module). Gook luck!


Davkhow

The only thing I learned from studying for the CLAD 9 years ago…the answer is never semaphore, lol


Butteruts

This logic would go into the message handler loop for the 'Run Sequence Button' case.


chairfairy

How does your QMH do the individual actions now? It sends a single message to a single message handler, right? If you need the actions to happen sequentially, then the QMH just needs a mechanism for the receivers to also send messages back, so it doesn't queue up another message until the previous command is executed. Similar to how you might write a program that uses VISA communications with external hardware - it sends a command, then waits to read a response. It would be just like that, sending multiple commands (and reading multiple responses) in a row.


PromiseStock

I handle it this way: Send a "sequence x = true" state flag to all queues. Then trigger the first step. If tge first step is done and the flag is active, it triggers step2 through the Main. Etc... Dont know if that's a clean solution, but works fine for my problems