LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted time delay in output of data between lasers interfaced with two controllers

Hello all,

 

Setup: I have a setup of 4 Keyence lasers connected to two different controllers. Each controller is connected to two lasers. The controllers are then connected to the controller via USB and Ethernet cable. One controller utilizes the USB connection and the other controller utilizes the ethernet connection. The laser setup is meant to measure vertical distance and this data is then plotted over time. There is also a gyroscope setup on the lower half of the block diagram attached. The gyroscope measures the rotation of the assembly. 

 

Issue: The issue is that once the data is plotted, there is a noticeable time delay between the lasers from two different controllers. There is also a small time delay between lasers from the same controller, but not as significant. I do not know what is causing this delay.

 

Troubleshooting Performed: 

  • Interfacing the controllers with two USB's or two ethernet cables instead of one USB and one Ethernet cable (no change in delay)
  • Using a more powerful computer in case there was an issue with processing times (no change in delay)
  • Reached out to the laser manufacturer for technical help. They mentioned something called a trigger counter and profile data which could be contributing to the delay, but did not know how to configure LabView to minimize the delay.

I have attached the .vi code and screenshots of the resulting data in which you can see the time delay. Please let me know if you would like to see anything else or have any questions. Thank you for your help!

Download All
0 Kudos
Message 1 of 4
(1,653 Views)

I don't have the Keyence drivers installed, so I get a lot of unfound VIs. But, I do have a couple suggestions / questions. 

 

Questions: 

What is the 2D array of I32 coming from "Extract Profile Array.vi"? Does that have timing and position data in it?

Why do you record the "second" data from "Get Time.vi"?

Is there anything that tells the 2 controllers to start recording at the same time? If you need microsecond synchronization, you will definitely want some kind of a hardware trigger. If the data read is started with "Read Profiles.vi", I would count yourself lucky that the profiles are so close to each other!

 

Suggestions:

Read from each instrument in a separate loop. Write data to file in another separate loop.

Don't use dynamic data nodes. You can build a single element array using "build array".

No need for "wait until (ms)" and a timeout of 50ms on the event structure

 

0 Kudos
Message 2 of 4
(1,623 Views)

Thank you. After some discussion with some folks, I think we are wanting to do a mechanical trigger of some sorts. We are not exactly sure how to go about implementing it though to ensure that controllers are reading at the same time. Got any suggestions?

0 Kudos
Message 3 of 4
(1,567 Views)

Can you explain what you mean by "mechanical trigger"? Like pushing a button?

 

Where the trigger comes from is completely up to you and dependent on your application. Sometimes it comes from some other part of the process or test. If you just want to trigger "on command" you can use a digital output from cheap DAQ hardware.

 

You may to have to talk to Keyence or read the manual to figure out how to make the instrument wait on a trigger to collect data. If that option is available, usually some wiring is required to get your trigger signal connected to the I/O pin of the instrument.

0 Kudos
Message 4 of 4
(1,560 Views)