From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop Delay

Solved!
Go to solution

Hi Guys,

 

I am new in Labview, hope to get an idea how to do this:

 

I am doing driling process for set of 200 holes.  Each hole takes about 2secs to drill, and distance between holes is about 3 secs. I am interested in getting data for the drilling only, and neglect the tool travel  between holes.

 

I got the idea to delay the loop(for tool travel)using 'wait unti next ms', which i should set for 3secs. But how to set my loop runs and collect data for 2secs before that?,I set the no of samples to be 1000 with 1khz sampling rate.

 

Thank you.

 

0 Kudos
Message 1 of 7
(3,175 Views)

Post your VI.

 

Sounds like you need to take LabVIEW tutorials.

http://www.ni.com/getting-started/labview-basics/

0 Kudos
Message 2 of 7
(3,138 Views)

You should share the code that you have this far, so we have a starting point to help you with.

 

Yolu also probably don't want to use Wait Until Next ms Multiple unless you know that it will always perform tasks at a multiple of 3000 on the clock, or you're trying to synchronize with something else.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 3 of 7
(3,134 Views)
Solution
Accepted by topic author Shah235

Technically it is wait, measure (2k samples, 1kHz), repeat loop. State machine, sequence in the loop, etc.

The problem is in synchronization. You are saying it takes about 3 sec to move and about 2 sec to drill. Error in specifying time of 2 ms on each stage and you are off by a second by the 200-th hole. Programmatically (not real-time) you can synchronize loops (reading data and movement) with precision of 10 ms I would say, not more. Also moving drill between holes takes different time.

 

I would collect all data, then split them into holes parts if you can (search for peaks, etc, I do not know if there is significant difference between drilling data and movement data. Processing can be done on the fly or after collection.

If you have significant signal level changes - you can try analog triggering = acquire when signal crosses specified level.

Otherwise you need digital signal to trigger acquisition when drilling of each hole starts. 

 

0 Kudos
Message 4 of 7
(3,122 Views)

I agree with others - I would try to create a more robust piece of software that detects the difference between drilling/moving or if that isn't possible, collect all of the data and post-process it.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 7
(3,116 Views)

Thank you your help!

 

That's what i am currently doing, collect all data and get them post-processed.

0 Kudos
Message 6 of 7
(3,097 Views)

Is this some exercise?  It feels like using a screwdriver as a chisel.  Is there a reason you cannot use the correct tool - i.e., a CNC machine?

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 Kudos
Message 7 of 7
(3,081 Views)