LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Velocity profiling with SoftMotion Module

Hello Reid,

thanks for the reply.


If the goal is to be able to read in from our load cell and command our motor until a set stress strain is achieved?

Yes, this was my plan.

This I think should be possible by making small commanded moves in RT and then reading back the settled strain and moving to another position based off this. What we would be doing is commanding force by providing displacement that lead to pressure on the sample.

Do you think that this is feasible?

With the Straight-Line Move, the movement will result as a series of small trapezoidal trajectories, i.e.  a series of start, accelerate, decelerate and stop. The  movement will have a discontinuous velocity and, consequently, the force applied by the carriage will show the same signature.

To follow a test profile, by making small Straight-Line Move, will result in updating at every loop the target position or the velocity or both.
For example, consider a control loop on the RT that runs at 5 ms (Scan Period = 5 ms, Number of  Scans = 1).

I think that updating only the position we run the risk that when the profile of the force is steep, the target position can be too far away to be reach in time. This will generate an error like Error -77070 (A Start operation is pending. Please add a delay between consecutive preemptive Start Motion calls.)

I think that updating both position and velocity we get the same issues describe above in this post.

Question (1)
Am I wrong? … In case I am wrong, can you please explain to me better your idea.

My actual hardware includes now a compactRIO and two module, the 9512 and the 9237.

I am evaluating to change completely the NI hardware, for example I am considering a PXI controller with a motion board like the PXI-7352.

In this case I could use the AI of the motion board to read the load cell (with an external amplifier to conditioning the load cell signal).
My idea is to use the load cell as the feedback for the on board PID, and to control the stepper in velocity.

Question (2)
Is this possible and correct?

Question (3)
Do you have other advices to build a robust system for tests, controlled both in force and in elongation, by using a PXI architecture?

Thank You
Asper

0 Kudos
Message 11 of 25
(3,009 Views)

Hi Asper

 

Stepper Velocity to Produce Force:

 

The force exerted by the stepper motor is going remain constant on each pull in and pull out move with the highest torque in a holding position. This is why steppers are great for applications where we want to move to a specific position and hold very still. Increasing the velocity wont make the motor turn any harder as the set current remains the same in the coils. It would continue to displace the sample until in crushed and deformed it.

 

PXI HARDWARE:

 

Changing out the controller with the PXI-7350 I don't think would provide quite the solution you are looking for. Our problem is that the motors and drives are stepper and not servo. The PXI-7350 does allow you to set the feedback to analog in servo mode, so this works as an alternative to our ideal case cRIO setup.  We also have sample code on how to run torque control with the PXI-7350 and a servo motor, you canfind this detailed in the NI-Motion help under Torque Control. Would we be able to consider different motors and drives for use with the stage? Your need for torque control is fairly common but will really require servo motors.

 

Current Setup:

 

Our only means to control the force on the current sample is to use its internal elasticity and change the deformation so that we get a desired pressure from our strain gauge. This is going to be the only way we can control the force the sample is experiencing. My recommendation isto make a number of small moves with low acceleration and velocity settings so we don't "jerk" the sample. The goal would be to achieve to match the value of the strain gauge in RT. This maybe a slow process I am unsure of what the response time would be, you are correct that each move would take longer than 5ms. You could run an open loop configuration with the forces where you run a contoured move along the pre calculated strains.

 

 

 


Thank You
Eric Reid
National Instruments
Motion R&D
0 Kudos
Message 12 of 25
(2,992 Views)

Hi Asper

 

I wanted to follow up, were you able to get the project figured out? Please let me know how things are going.

 

 


Thank You
Eric Reid
National Instruments
Motion R&D
0 Kudos
Message 13 of 25
(2,958 Views)

Hello Reid,
I'm still confused about the torque issue.


In my case, the goal of the linear translation stage is to reach a position (an elongation of the sample),  because the force applied to the sample is a consequence of the elongation.
My initial idea was that the linear translation stage (i.e. the stepper) should deliver and guarantee a load capacity enough to overcome the maximum required load, both dynamic and static.
The data sheet of the linear translation stage reports a load capacity (up to 1 kg) up the maximum speed (5 mm/sec), values that are compliant with our test requirements.

You said:  While running at a faster speed would result in less torque in the pull in and pull out moves on the stepper this would not be a linear relationship and highly unadvisable. (omitted) The greatest amount of torque you will see from a stepper motor is its holding torque after it has settled into position and the coils are fully active.

From one hand I agree with you, from the other I ask me if your notes apply to my system.


In case of rigid sample is strictly true that the motor should be able to deliver a tunable torque because the elongation or compression of the sample is practically zero. For example, this is the case of testing systems for stone, the applied force can increase with piratically zero movement up to the fracture of the sample.

 

In case of soft sample, like in my system, there is a strict correlation between applied force and the elongation or compression of the sample. In this case, it seems to me that the only strict-requirement is that the load capacity, both dynamic and static, has to overcome the maximum required load.

Question (A)
Am I right?
In case I am wrong, can you please explain to me way, again.

Question (B)
In case I'm right, can a control system, that closes the loop on the load cell and that drives the velocity of the stepper, get troubles from the nonlinearity that you have previously describes?

This last question is very important. If there are reasons that foreclose to the control loop to correctly operate I have to rethink the mechanics.
To fully test the system I have to build it, and, at the end, would be very bad to discover that the system can not work correctly.

In case I'm right, I have decided to abandon the cRIO architecture and I try to figure out a patch solution based on the PXI.
I have accepted your note on the PXI-7350 and on the on-board AI, consequently I'm thinking to a different solution.

Now the idea is to develop a control that run on board of the PXI CPU (real-time).
The control loop will do at every iterations the following actions:
1.  To read the load cell through a dedicate module (this will be the process variable of the PID)
  1.1.  I'm testing the 7831R + R Series Expansion Chassis + NI 9237.
  1.2.  The filtering and averaging of the signal is done on the FPGA.
2.  To elaborate the point-to-point test profile (this will be the set point of the PID)
3.  To elaborate the PID with pre-filtering and deadband
4.  To write the PID output as the motor velocity.
  4.1.  I'm testing a PXI-7350 motion control.
5.  To communicate with the GUI.

I have the following hardware: PXI-1042Q + PXI-8196

Question (C)
Which are your remarks and advices on the previous idea?

By testing the point 4 (to write the PID output as the motor velocity), I have discover that there is a speed limitation in the communication between the PXI CPU and the motion board.

 

First I have tested to call, at every iterations, the "Load Velocity" and "Start Motion" VI's to update the velocity. With this approach the loop iteration can not be faster than many milliseconds otherwise the jitter becomes very high.

 

In a second try, I have tested to store the "Load-Velocity" and "Start-Motion" VI's on board of the motion controller. The following VI snippet is the program storage code.

 

Program_Storage.png

 

At every iterations, I use the "Load Constant to Variable" to update the velocity. With this approach the loop iteration can be faster than before, now the lower limit is around 2 ms otherwise the jitter becomes very high.

Question (D)
There is a faster technique to update the velocity?

Question (E)
In any case, and particularly if I'm wrong to question (A), could you please indicate to me the wish list for the motor type and for control electronic to realize the control system that I have described in this and previous posts.
Furthermore could you please indicate a LabVIEW motion example that realize a close loop by reading an external process variable (load cell) and by performing a correct velocity/torque control.

Regards,
Asper

0 Kudos
Message 14 of 25
(2,939 Views)

Hi Asper

 

 

Application Setup:

 

In my case, the goal of the linear translation stage is to reach a position (an elongation of the sample),  because the force applied to the sample is a consequence of the elongation.
My initial idea was that the linear translation stage (i.e. The stepper) should deliver and guarantee a load capacity enough to overcome the maximum required load, both dynamic and static.
The data sheet of the linear translation stage reports a load capacity (up to 1 kg) up the maximum speed (5 mm/sec), values that are compliant with our test requirements.

 

When you list the maximum load capacity for the stage, I take it this also includes the stepper motor? The reason I ask this is manytimes the stages will be sold separately from the motors and this would explain why swapping out a stepper motor for a servo is not an option for you.

 

Is the force in this example truly consequent entirely on elongation? Softer materials generally experience small amounts of plastic deformation resulting in unrecoverable strain. Brittle materials such as ceramics will not deform but will fracture instead. I understand that the material being tested for our intents and purposes and can not be disclosed openly over the internet. I don't think without the variable current of a servo motor our strain gauge will be a good primary feed back source especially if it is deforming with the material under test. If we want to run compressive stresses we will need to consistently vary force from feedback on the rigid element, as the plasticity changes we may be adding less and less force to our material.

 

Impact Strength of the material will also be a factor when using velocity control. Some materials are able to withstand higher impacts before fracture of the material occurs. Since we will not be ramping up force on our material there will be an impact from the stepper, this will not be a smooth it sounds like the system moves very slow but this may still effect calculations for yield strength based on velocity.

 

What specifics are you trying to find from your material?

Yield Strength?

Compressive Strength?

Tensile Strength?

Fatigue Strength?

 

There are possibly a number more material factors that could effect the data, a Materials Engineer would most likely be able to help you highlight these better and advise than I.

 

Coding Concerns:

 

For LabVIEW examples we have documentation and code for analog feedback with servo motors but not stepper.The reason they do not exist is that they are not a typical usecase, even when running stepper with a closed loop feedback we wait for the move to complete then perform a pull in move. You could command different positions with your code and then measure the value of force and adjust, I understand you want to use PID for elasticity to speed up the process but you may have a very limited resolution anyway. Customers have used Velocity Override on the plugin boards in the past (this should work as you experienced with the RIO the CARs for the RIO are specific to SM and not the plugin boards) but it was in loops with a very large latency.

 

Another approach, as we start to do things out of the ordinary, with the RIO FPGA you always could use a DIO and Analog module and setup a loop to generate a step and direction line in FPGA and run the PID based off the analog input. This starts to become more of a controls problem and not one requiring motion trajectories. 

 

You have been working on this issue for a while now, do you have an open support ticket with National Instruments Applications Engineering? I wanted to check because sometimes I get busy and don't have a chance to reply to our forums for a couple of days. Also if you still are in contact with the supplier of the stage they maybe able to provide you with one that has servo motors installed instead (this would resolve the issue). I will still be reading this forum post of course and if you could give me the name of who else you are working with at National Instruments I can catch them up to speed on the issue.

 


Thank You
Eric Reid
National Instruments
Motion R&D
0 Kudos
Message 15 of 25
(2,915 Views)

Hello Reid,

When you list the maximum load capacity for the stage, I take it this also includes the stepper motor?

Yes, load and speed refer to the overall linear translation stage, inclusive of the stepper.

The reason I ask this is many times the stages will be sold separately from the motors and this would explain why swapping out a stepper motor for a servo is not an option for you.

The stepper is designed for applications with very limited space conditions and the motor is hollow. For this traslation stage the supplier has not a servo motor option. To change the motor I have to change the entire translation stage. This translation stage has been selected as a compromise between performance and price and to find a new one is not a simple issue.

Is the force in this example truly consequent entirely on elongation? Softer materials generally experience small amounts of plastic deformation resulting in unrecoverable strain.

Yes, I think that the force is consequent entirely on elongation, at least this was my initial idea.

Samples will be similar to cling film for food but more much weaker.
For simulation purpose, samples can be consider as spring made of a material that easily experience a plastic deformation.

Under constant elongation, the sample will first experience a short elastic phase, after will start an inelastic phase (plastic deformation) that will stop as the sample will break.

For tests controlled in force, for example, a test profile that increases linearly will correspond, in the elastic phase, to an elongation with constant speed.
As the inelastic phase starts, a further elongation of the sample will not correspond to an increase of the force and the elongation will speed up to try to increase the force.
Quickly the sample will break, the force will decrease abruptly and the control will stop the test.

I don't think without the variable current of a servo motor our strain gauge will be a good primary feed back source especially if it is deforming with the material under test.

Do you mean the deformation of the load cell?

The maximum deformation of the load cell at the nominal load is typically 0.15 mm. In the working range the load cell is fully elastic and the elongation is linear with the applied load, probably, the load cell will experience an hysteresis between tension and compression.
In any case, I intend to measure the deformation under load of the load cell and to use the result data for calibrate/correct the sample elongation measured by the linear encoder. To measure experimentally the load cell deformation, my idea is to use a very rigid sample.
Please consider that, with a spatial resolution of 20 nm, the 0.15 mm path can be divided in 7620 samples.

The expected sample elongation is circa 1 mm. We do not know anything about elastic/inelastic phase of the sample, this is the goal of measures.
 
Impact Strength of the material will also be a factor when using velocity control. Some materials are able to withstand higher impacts before fracture of the material occurs.

This is true.

Since we will not be ramping up force on our material there will be an impact from the stepper, this will not be a smooth it sounds like the system moves very slow but this may still effect calculations for yield strength based on velocity.

I think that by controlling the torque will result in the same effect. As the sample comes in the inelastic phase, a further increase of the motor torque will not correspond to an increase of the force and the motor torque will speed up to try to increase the force.
Probably a control in displacement (closing the loop on the encoder) will ensure the system to move slow also during the inelastic phase and breaking of the sample.
For this reason from the beginning, the system has request to have both force control and displacement control.
 
What specifics are you trying to find from your material?

Yield strength, tensile strength and fatigue strength.

For LabVIEW examples we have documentation and code for analog feedback with servo motors but not stepper.

Could you please indicate a LabVIEW motion example with cRIO that realize a close loop by reading an external process variable (load cell) and by performing a correct torque control (servo motor).

 

I need this example to better understand the torque control that you propose.

You could command different positions with your code and then measure the value of force and adjust, I understand you want to use PID for elasticity to speed up the process but you may have a very limited resolution anyway.

Sorry, this is not clear to me.

Customers have used Velocity Override on the plugin boards in the past (this should work as you experienced with the RIO the CARs for the RIO are specific to SM and not the plugin boards) but it was in loops with a very large latency.

Please note that Velocity Override on the plug-in board has the same limitation of just positive numbers. The LabVIEW help states:

Override Percentage (100%) is a single precision floating point value from 0 to 150%. This value directly scales the programmed velocity. The default value is 100% (no effect).

Another approach, as we start to do things out of the ordinary, with the RIO FPGA you always could use a DIO and Analog module and setup a loop to generate a step and direction line in FPGA and run the PID based off the analog input. This starts to become more of a controls problem and not one requiring motion trajectories. 

With this approach I lose all motion features, even those that work well, and I will necessitate to low level programming every motion function and this means, at least for me, many month of work!

You have been working on this issue for a while now, do you have an open support ticket with National Instruments Applications Engineering?

Yes, from the beginning, but unfortunately my country support has not deep experience on the SoftMotion.
At every question that I have posed them, they have wrote to someone in corporate. This procedure doubles the answer time and can easily create misunderstanding because I speak with them in my country language and they translate, in English, something that they don't have very well understand.
They know this post.

Please note that your support has been very very useful and very very important for me, and I hope that will continue.

Many thanks and regards,
Asper

0 Kudos
Message 16 of 25
(2,892 Views)

Hi Asper

 

No problem, I don't mind helping out if you can forgive that sometimes it will take me more than a day to reply. 

 

The stepper is designed for applications with very limited space conditions and the motor is hollow. For this traslation stage the supplier has not a servo motor option. To change the motor I have to change the entire translation stage. This translation stage has been selected as a compromise between performance and price and to find a new one is not a simple issue.

 

This was something I figured, the servo motor would fix the issue entirely for you. I understand effort went into the stage selection by price and resolution. I do feel you have been working very hard at finding a Software soltion to work around the stepper constraint and depending on the timeframe for the project changing out the hardware may still be something to keep an open mind to. I have myself used a load cell and done stress strain calculates on materials in a lab, I used a servo motor when I did it the code I ended up using was very similar to what is shown in Chapter 13 of the motion user manual.

 

analog feedback.png

 

My load cell was in the update loop and I simply increased the load target until I would see fracture.

 

Under constant elongation, the sample will first experience a short elastic phase, after will start an inelastic phase (plastic deformation) that will stop as the sample will break.

For tests controlled in force, for example, a test profile that increases linearly will correspond, in the elastic phase, to an elongation with constant speed.
As the inelastic phase starts, a further elongation of the sample will not correspond to an increase of the force and the elongation will speed up to try to increase the force.
Quickly the sample will break, the force will decrease abruptly and the control will stop the test.

 

With our current setup I don't think we will be able to get a good feedback for analog to our stepper loop. The problem is all our steppers run with a position feedback loop, so all our update rates in our PID will be controlling position. It may slow down the loading process but I propse the following work around, I am writing this in psuedo code you should be able to use this on the cRIO or Plugin boards.

 

Step:

1.) Load elasticity constriants, these would be based and an estimate of where within the the limits of the material. These will convert to realative positios on the stage.

2.) Command a straight line move to this position and read force, if the force from the strain is equal to our target for load testing command a move back to no strain. If not perform a small pull in move to increase the force then read sensor and move again. This would function similar to how a closed loop stepper would work. Since each move is a small one we can constantly log data on cycles, stress strain etc.

3.)  As the process repeates we would update the limits on where to move to compensate for plastic deformation.

 

I think for your application it would look something like this:

 

For tests controlled in force, for example, a test profile that increases linearly will correspond, in the elastic phase, to an elongation with constant speed.
As the inelastic phase starts, a further elongation of the sample will not correspond to an increase of the force and the elongation will speed up to try to increase the force.
Quickly the sample will break, the force will decrease abruptly and the control will stop the test.

 

Move position till we have a loaded force and make a number of short moves as we strech out the material when the load cell reads no force we assume our material has broken. We can also tell when we move into the inelastic phase because we will stop seeing an increase in force on the load cell, we can log all the position measurements through the small moves.

 


Thank You
Eric Reid
National Instruments
Motion R&D
0 Kudos
Message 17 of 25
(2,860 Views)

   Hi! asper,How are you! may I could make friend with you?  I am a student  pursuing a master's degree in zhejiang sci-tech university in hangzhou zhejiang province of china.,my major is mechanical design and mechanical engineering. Now I am studying  NI Labview ,NI SoftMotion or NI SoftMotion for SolidWorks, there are many problems for me , there are not any website to introduce knowledge about NI SoftMotion or NI SoftMotion for SolidWorks in china. If you could give me help ,I will have great improvement in studying NI Labview ,NI SoftMotion or NI SoftMotion for SolidWorks, and it is also  will be usefull for me to improve my English skill. My English is poor , forgive me if there have any difficulties for you to read my text.

I will be appreciated if you give me a email attaching your email ,MSN number ,or other contact mode.My email is hanyang19861017@163.com, mobile phone number is 13634129375 and QQ is 575748306, my address is zhejiang sci-tech university, jianggan district, hangzhou  zhejiang province in china.  If you want to make friend with me ,I  am looking forward your email.

0 Kudos
Message 18 of 25
(2,520 Views)

 Hi! Asper,

     How are you! may I could make friend with you?  I am a student  pursuing a master's degree in zhejiang sci-tech university in hangzhou zhejiang province of china.,my major is mechanical design and mechanical engineering. Now I am studying  NI Labview ,NI SoftMotion or NI SoftMotion for SolidWorks, there are many problems for me , there are not any website to introduce knowledge about NI SoftMotion or NI SoftMotion for SolidWorks in china. If you could give me help ,I will have great improvement in studying NI Labview ,NI SoftMotion or NI SoftMotion for SolidWorks, and it is also  will be usefull for me to improve my English skill. My English is poor , forgive me if there have any difficulties for you to read my text.

    I will be appreciated if you give me a email attaching your email ,MSN number ,or other contact mode.My email is hanyang19861017@163.com, mobile phone number is 13634129375 and QQ is 575748306, my address is zhejiang sci-tech university, jianggan district, hangzhou  zhejiang province in china.  If you want to make friend with me ,I  am looking forward your email.

0 Kudos
Message 19 of 25
(2,518 Views)

 Hi! Asper

    I a student in China, could the NI SoftMotion or NI SoftMotion for SolidWorks simulate realistic machine running condition?  which include the assembly tolerance ,combination and auxiliary device such as sensor . However ,the real machine system are not drived by serv motor, most of them are drived by screw rod , belt drive and hydraulic pressure device. If NI company solve these factor, it is not reliable for us to use these data generated by Virtual prototyping to produce physical prototyping .But there are many constraint for us to use NI SoftMotion or NI SoftMotion for SolidWorks to simulate realistic machine running condition. If that ,we choose the ADAMS software to simulate the kinematic or dynamic of machine at all .Why NI SoftMotion or NI SoftMotion for SolidWorks module are not downloaded freely. 

      I am a student  pursuing a master's degree in zhejiang sci-tech university in hangzhou zhejiang province of china.,my major is mechanical design and mechanical engineering. Now I am studying  NI Labview ,NI SoftMotion or NI SoftMotion for SolidWorks, there are many problems for me , there are not any website to introduce knowledge about NI SoftMotion or NI SoftMotion for SolidWorks in china. If you could give me help ,I will have great improvement in studying NI Labview ,NI SoftMotion or NI SoftMotion for SolidWorks, and it is also  will be usefull for me to improve my English skill. My English is poor , forgive me if there have any difficulties for you to read my text.

I will be appreciated if you give me a email attaching your email ,MSN number ,or other contact mode.My email is hanyang19861017@163.com, mobile phone number is 13634129375 and QQ is 575748306, my address is zhejiang sci-tech university, jianggan district, hangzhou  zhejiang province in china.  If you want to make friend with me ,I  am looking forward your email.

0 Kudos
Message 20 of 25
(2,518 Views)