LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 200279, Motor control and Measurements

Solved!
Go to solution

Hello together,

 

Im trying to control a motor and everything is working seperately but when i put it together this error message occurs.

 

Julsbng_0-1705323713709.png

Im reading a Angle with digital inputs and the Toque as a Analog input. The thought behind the program is that every time the angle changes, the Torque should be measured and given out to the graph over the corresponding angle measured. 

The motor control channel is just starting the motor via button.

The analog output controls the speed of the motor. 

 

The program runs fine for the first minute and then the error is stopping the program. 

 

Im aware that the programm is not the cleanest and i will do the fine tuning when it is running properly without an error. Im using a NI 6212 as data exchange device.

 

Below are the pictures of the Tasks configured in NI MAX. 

Julsbng_1-1705324188346.png

Julsbng_2-1705324289217.png

I hope your able to help me because im stuck and have no idea how to fix this. 

 

Thanks in advance 

 

Best regards 
Julius

0 Kudos
Message 1 of 16
(1,466 Views)
Solution
Accepted by topic author Julsbng

Hallo Julius,

 

bitte nicht per PM um Hilfe zu deinem Thread im Forum fragen…

 


@Julsbng wrote:

Im aware that the programm is not the cleanest and i will do the fine tuning when it is running properly without an error. Im using a NI 6212 as data exchange device.


Comments on your VI:

  • Unfortunately you use a very recent LabVIEW version. I'm stuck on an older version (due to license issues) and so you should downconvert your VI to allow more of us to help you. I prefer LV2019. (File->Save for previous)
  • There is no error handling in your VI. Please add that!
  • Why do you mix different sampling modes in your loop? Set ALL DAQmx tasks to "1 sample on demand"! (This will get rid of the -200279 error.)
  • What's the purpose of the "1 iteration FOR loop"? It's pure Rube-Goldberg! Put the shift registers to the outer while loop so you don't need this "fake" loop!
  • What is the purpose of using two shift registers to hold the very same value?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 16
(1,419 Views)

Hey,

thanks for all the advices and improvements first! I really appreciate.

I will fix the points you mentioned and will upload the Vi in version 2019 tomorrow. 

That’s true with the shift registers and the loop i will fix that! 

Thank you for the first help. 
best regards 

Julius 

0 Kudos
Message 3 of 16
(1,410 Views)

Hello Gerd,

 

Thanks again for all the points you mentioned, the error notification is fixed now. 

I also corrected all other things you mentioned. 

Sadly i got a new problem while fixing this.

When the motor speed is increased the angle measurement is getting worse and incorrect. The motor is rotating in on direction but the angle is not increasing like it should. At higher speeds than 2rpm the measurement goes crazy... It goes from 1.6 degree to -3 without even changing the direction of rotation. 

Do you have any idea how to fix this. 

I attached the program in version 2019. 

Julsbng_0-1705403714191.png

 

0 Kudos
Message 4 of 16
(1,393 Views)

I did not have the problem when the Torque Task where set to Continuous Sample 100 1k.

Thats why i did this. 

0 Kudos
Message 5 of 16
(1,389 Views) </