LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating two timing loops for different excel logging

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.

 

 

0 Kudos
Message 1 of 13
(2,580 Views)

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…)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 13
(2,578 Views)

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. 

0 Kudos
Message 3 of 13
(2,571 Views)

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, …)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(2,561 Views)

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. 

0 Kudos
Message 5 of 13
(2,545 Views)

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.

0 Kudos
Message 6 of 13
(2,522 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 13
(2,519 Views)

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

0 Kudos
Message 8 of 13
(2,517 Views)

Hi Bob,

 

actually that picture is a snippet…

 

But: when trying to drop it in an empty VI I get a huge list of missing items and finally LabVIEW 2017 refuses to drop the snippet…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 13
(2,516 Views)

I have had trouble submitting the VI before but I will attach it below and please let me know if you can open it.

0 Kudos
Message 10 of 13
(2,511 Views)