04-05-2018 07:09 AM
I currently have a program that is able to send signals to two AC drives and set the two different motors to a user chosen RPM. each of these motors are attached to a gear being tested with an accelerometer. My problem stems from having one front panel that will start the test time for both when I am in need of being able to separate the test timing for the individual stands.
04-05-2018 07:16 AM - edited 04-05-2018 07:17 AM
Hi Nemord,
I am in need of being able to separate the test timing for the individual stands.
When you want to run parts of your code seperately and independend from each other you should NOT put them into the very same case of your case structure!
Use two case structures to handle the two sets of "tests"…
(There are surely better ways to program all this code than just to drop all into just one VI! Right now your block diagram is already 3 times the size of a FullHD display…)
04-05-2018 07:33 AM
Haha yes I am aware my coding practice needs work and can be improved quite a bit. Still a relatively new labview user. I have them in the same case because im not sure how to have the split signal lead into a different case without breaking the VI. My question is more how do I start breaking My Vi into more manageable parts. I have tried two case structures but the VI did not work as intended most likely from an error I was not seeing.
04-05-2018 07:53 AM
Hi Nemord,
LabVIEW comes with ready-to-use example projects explaining producer-consumer-structures and statemachines. I guess you could use them…
but the VI did not work as intended most likely from an error I was not seeing.
We cannot see that error because you don't provide any information on it (VI, error messages, …)
04-05-2018 08:45 AM
I currently have a test on a single test stand running so I cannot readily retry my two test stand VI with the second case structure, but as soon as the test is completed I will be able to provide more detailed information. As for the example this current build was structured off the simplified state machine. I have been reading great nuggets in my spare time to see how I can implement better design. The daq being used for the test is a pxie 6363.
04-06-2018 07:30 AM
When wiring a split signal from the daqmx read into another case structure with a while loop inside how would the information transmit? Would it not be stuck in the previous while loop before ever transmitting. Is there a possibility of using two daqmx created channels that relate to the same daq board without getting an error? Just trying to think of ways to accomplish having different timers and using both test stands if needed or have one running and than configure the next test stand to run later on if need be.
04-06-2018 07:34 AM
Hi Nemord,
Would it not be stuck in the previous while loop before ever transmitting.
Yes, thanks to THINK DATAFLOW!
Is there a possibility of using two daqmx created channels that relate to the same daq board without getting an error?
Yes, sure!
LabVIEW comes with a huge library of example VIs.
I'm sure there are examples showing how to read multiple AI channels…
04-06-2018 07:37 AM
Do you seriously expect anyone to be able to look at that huge picture of (part of?) your Block Diagram and make any sense of it? If you had attached the VI, we could have used the Navigation Window to examine parts critically, "improved" it by creating 10 sub-VIs to "encapsulate" sections of code and make it a more manageable (and understandable) size, and understand what you are trying to do.
Just from your title, of course you want independent timing loops doing different tasks if they are doing them at different speeds. I hope (but didn't even try to see from that mess you attached) you are using DAQmx functions and not the Dreaded DAQ Assistant (DDA) or its Evil Twin, the Dynamic Data Wire ...
I'll wait to see a VI. Note that if you do have sub-VIs, you can send them all to us by compressing the folder containing them and attaching the ZIP file. This is especially useful if you are using LabVIEW Project to organize your code.
Bob Schor
04-06-2018 07:59 AM
04-06-2018 08:09 AM
I have had trouble submitting the VI before but I will attach it below and please let me know if you can open it.