LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues using DAQ to control a linear induction motor

Project Context:

I have built a bi-axial load applicator, which uses a linear induction motor to launch a carriage horizontally. Meanwhile, vertical velocities are achieved by allowing the impactor to free-fall from a set height. The travel length of the carriage is 6m and I have two panel mounts to connect the DAQ to the PC via 3 USB cables of various lengths which are supported by an AC-powered USB Hub (0.5m|6m|2m). I have developed a LabVIEW program, which until recently has been working as desired. Unfortunately, I have damaged the USB going from my PC to the first panel mount. Since then I have been experiencing some issues which I require assistance to resolve so that I can continue testing.

 

The LabVIEW program is able to acquire and save the data during:

  • Static drops (no horizontal velocity) 
  • Dynamic launches where the horizontal is manually generated by pushing the carriage.

However when I use the linear induction motor to propel the carriage I have received the following errors:

  • Error – 50808 @ DAQmx Start Task 7220002
  • Error – 50808 @ DAQmx Start Task 7220004
  • Error – 50808 @ DAQmx Stop Task 3590002
  • Error – 50405 @ DAQmx Start Task 7220002
  • Error – 50405 @ DAQmx Start Task 7220004

Warning - 50808

A USB transfer failed due to a transaction error reported by the USB host controller. This may be due to a fault in the system’s USB host controller, a cable or a USB device.

 

Warning - 50405

No transfer is in progress because the transfer was aborted by the client. The operation could not be completed as specified.

 

I have tried the following suggestions from these error codes but have not found a suitable resolution: 

  • Disconnect the USB cable, then reconnect it
  • Remove power from the USB device, then reconnect it
  • Try replacing or using a different power supply and/or USB cable 
  • Try connecting your device to another computer to verify device works

Also could you let me know the difference between a DAQmx Start and Stop Task and what the numbers after this means? 

 

I would appreciate any feedback on suggestions to resolve this issue. 

 

Max

0 Kudos
Message 1 of 11
(394 Views)

You have unspecified hardware being controlled by an unspecified LabVIEW routine that once worked, then some hardware (possibly involving the DAQ hardware?) was damaged, and now things don't work.

 

The first order of business, it seems to me, is to find out where in your code the Errors occur.  Do you know how to use Probes?  I would place a probe before and after each DAQmx function in your routine and possibly put a Breakpoint at the end of DAQmx code executed inside a loop (which assumes that the error occurs on the first execution) to pin down where in your code the problem lies.  Since you seem to have multiple DAQ devices, this might help you pinpoint which device "needs fixed" (as they say in Pittsburgh).

 

For more help/suggestions, please provide the relevant LabVIEW code ("Saved for Previous Version" in LabVIEW 2019 or 2021 if you are using the latest versions).

 

Bob Schor

0 Kudos
Message 2 of 11
(354 Views)

Hi Bob, thanks for the response. 

 

For clarity - I am only using one USB-6212. When the USB cable was broken it was not connected to the DAQ so I do not think the DAQ is damaged. I have no experience using probes, however, the program operates as desired when the linear induction motor (LIM) is not powered. The issue I'm experiencing occurs when the LIM is activated. Can electromagnetic interference from the LIM affect the LabVIEW program?

 

I've attached my code and would appreciate any suggestions on improving it to prevent this issue.  

0 Kudos
Message 3 of 11
(339 Views)

@Max2796 wrote:

Can electromagnetic interference from the LIM affect the LabVIEW program?


More like the EMI can affect the signals over the USB cable and cause a (software) shutdown of the USB connection or even reset the USB device.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(328 Views)

Why would this setup previously work but now its having issues?

0 Kudos
Message 5 of 11
(325 Views)

I ocasionally receive a windows notification saying

 

"USB device not recognised

The last USB device you connected to this computer malfuntioned and Windows does not recognise it"

 

Is this what you would expect if the DAQ has been reset?

0 Kudos
Message 6 of 11
(309 Views)

"I have damaged the USB going from my PC to the first panel mount."

 

What was the damage ? the USB cable got damaged ? The USB port in the PC got Damaged ? 

 

Have you tried different USB Cables ? with different lengths and shields ? 

0 Kudos
Message 7 of 11
(303 Views)

@Max2796 wrote:

I ocasionally receive a windows notification saying

 

"USB device not recognised

The last USB device you connected to this computer malfuntioned and Windows does not recognise it"

 

Is this what you would expect if the DAQ has been reset?


It is what I would expect if there was a lot of noise that got on the USB data lines and corrupted the communication between the DAQ and computer.  You need a well shielded USB cable and isolate ground from the system and the DAQ/Computer.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 11
(301 Views)

The male connector of the usb cable was crushed by a wheel.

 

Yes the original USB cable has been removed from the system incase there are any shorts to protect the rest of the system. 

 

I am using shielded cables as these are the best to use with the EMFs created by the linear induction motor.

0 Kudos
Message 9 of 11
(300 Views)

I would recommend trying the USB isolator board.

 

How is the LIM connected to the DAQ? do you use a motor driver? Are they 0-5V or similar industrial analog signals?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 10 of 11
(287 Views)