Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

MAX versus LabVIEW Axis Configurations - getting differences in Read Velocity in RPM

PCI-7344

P70350 drive

NI 3 stack Nema 23 Motor

 

P7000 tools used to set the drive steps/revolution to 5000 (microstepping)

 

in MAX and LabVIEW Steps/rev are loaded as 5000

 

Encoder is resolution is 1000  (so 4000 counts per revolution - verified by killing axis and rotating by hand.)

 

Issue:

 

When I initialize the controller in MAX and command a Velocity mode run of 30 rpm - I see a correct RPM around 30.

 

When I try to do the same setup in LabVIEW loading the steps and counts per revolution - then I command a 30 rpm run in velocity mode the motor is moving at an actual 30 rpm (I counted revs per minute to verify).

 

I am loading the parameters in the order specified here  http://zone.ni.com/devzone/cda/tut/p/id/4341 in the LabVIEW code.

 

I suspect an issue with the order of loading the steps and counts on the stepper axes in the system.  I do set the Steps/rev first, and then configure the encoders and set the Counts/rev after the Steps/Rev.  I then configure the encoder Filter Frequency after setting the Counts/rev.

 

Any input on this?

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 1 of 16
(6,954 Views)

Oops - the issue description is missing information: The motor moves at 30 rpms, but the velocity reading in LabVIEW shows 120 rpm.

 

When I run my Read Velocity in RPM VI while using MAX to control the axis it reads ~ 30 rpm as expected.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 2 of 16
(6,945 Views)

Of course when I change the Encoder Feedback setting in LabVIEW from 4000 counts per rev to 1000 counts - the motion returns an error - following error (which makes sense since this is not the correct setting).  I tried 1000 since 120 is 4 times greater than the expected 30 rpm.

 

I've never had this issue with NI Motion in the past. Hmm.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 16
(6,942 Views)

Hi Ryan,

 

The factor of four difference in your actual RPM vs the reported RPM does make me suspect a setting is off with the encoder or step settings. Could you please post your code? It would make it a lot easier to troubleshoot.

 

Thanks,

Daniel H. 

 

Daniel Hays | Test Software Business Manager
0 Kudos
Message 4 of 16
(6,937 Views)

I am not allowed to post the code - but I can E-mail it to you.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 5 of 16
(6,930 Views)

I just tried it with another motor and axis that I finally got the encoder for this morning and that axis (stepper) with the same settings is working correctly when loaded in MAX and monitored in LabVIEW code...same issue with the 4x rpm reading when loading settings using FlexMotion VIs

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 6 of 16
(6,926 Views)

I changed things very slightly in my state machine and now the settings are working in LabVIEW - you have to get the VIs in the correct order of calls for setting up the encoders. 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 7 of 16
(6,901 Views)

Hi Ryan,

 

I'm glad you got it working. Did you send your files? I never received anything, so I apologize if you sent something and I just didn't see it. Were the VIs in a different order than is suggested in the article you linked in your first post?


Regards,


Daniel H.

Daniel Hays | Test Software Business Manager
0 Kudos
Message 8 of 16
(6,886 Views)

I never got a reply on where to send them?

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 9 of 16
(6,858 Views)

Hi Ryan,

 

I'm sorry if my message didn't get to you. I replied to the message you sent me, so you would need to check the "Private Messages" section of your profile. I sincerely apologize for any confusion, but I'm glad you got your system working in the end. 


Regards,


Daniel H.

Daniel Hays | Test Software Business Manager
0 Kudos
Message 10 of 16
(6,841 Views)