Motion Assistant - Generating Sinusoidal Velocity Profile Options

Hi,
I am currently working on a project where I need to create a sinusoidal velocity program for the pump that I am controlling. It is believed that the person previously working on the project used a LabVIEW VI to generate an XML file to control the pump's velocity. Do you have any idea what VI in the motion suite would be able to do this?
Alternatively, is there an easy way to create the sinusoidal velocity profile using an EXCEL spreadsheet? And would it be better to use a position profile or a position-velocity-time profile in Motion Assistant?
Thanks!

Hi UW-AC-1,
There is no VI in our Motion drivers that will allow you to do this. However, it sounds like the previous person may have generated an array and then used a Write to XML File.VI (this can be found under Programming->File I/O->XML->LabVIEW Schema). 
From your post, it sounds like you may want to use a position-velocity-time profile in Motion Assistant. We have some examples of how to do this as well as a Discussion Forum here that discusses where these profiles are located. Hope this helps!
Mychal F
Applications Engineer
National Instruments

Similar Messages

  • Motion Assistant - Generating Sinusoidal Velocity Profile

    Hi,
    I am currently working on a project where I need to create a sinusoidal velocity program for the pump that I am controlling. It is believed that the person previously working on the project used a LabVIEW VI to generate an XML file to control the pump's velocity. Do you have any idea what VI in the motion suite would be able to do this?
    Alternatively, is there an easy way to create the sinusoidal velocity profile using an EXCEL spreadsheet? And would it be better to use a position profile or a position-velocity-time profile in Motion Assistant?
    Thanks!

    Hi UW-AC-1,
    There is no VI in our Motion drivers that will allow you to do this. However, it sounds like the previous person may have generated an array and then used a Write to XML File.VI (this can be found under Programming->File I/O->XML->LabVIEW Schema). 
    From your post, it sounds like you may want to use a position-velocity-time profile in Motion Assistant. We have some examples of how to do this as well as a Discussion Forum here that discusses where these profiles are located. Hope this helps!
    Mychal F
    Applications Engineer
    National Instruments

  • Sinusoidal velocity profile of a stepper motor using labview

    Hi I am trying to get sinusoidal velocity profile of the stepper motor using labview.
    Could anyone please help me out...

    I'm also really interested in this solution.
    I think you could do it by controlling the velocity of the stepper with points (excel) or function maybe... but that's an idea...

  • Motion assistant msvcr90.dl​l

    I was trying to run an EXE that I built that uses Motion Assistant to build contour profiles.  I was able to run this last week without this problem occuring:
    I am getting an access violation from LV 11.0 when it is trying to use MSVCR90.dll
    I have never seen this issue whent using NI Motion or boards before.  When I went to reboot Windows 7 (64) wanted to do an update install.
    I am running LabVIEW 2011 SP1 I believe.
    Anyone know what could be causing this?
    Upon reboot I will try again and see what the Windows update installed.
    Ryan Vallieu
    Automation System Architect

    Hi Ryan,
    I'm not sure what might be causing this, but here are a few steps we can take to identify the underlying issue:
    1) Is LabVIEW generating a crash log file when the access violation occurs? If so can you post it here?
    2) What version of NI-Motion is referenced by the EXE?
    3) MSVCR90.dll does not appear to be related to NI-Motion. Is the EXE performing any other notable functions? Particularly in calling external code?
    4) Was the EXE built on a 64 bit system? Does the same error occur on the development (or any other system)?
    Sorry for the long list of questions, but hopefully they will help us narrow down the cause of the crash.

  • Loop in motion assistant specified number of times?

    I was wondering if in motion assistant I can do a loop in my script so that each movement can be repeated many, many times without having to create a new 'step' for each movement? Any help is appreciated.
    Thanks,
    Nichole

    Nichole,
    Motion Assistant does not currently support loops in its environment. What I recommend is that you create your steps with just one pass and then add the loop in the code Motion Assistant generates.
    Rodger S.

  • How to built a Velocity profile without a motion assistant mudule

    I wanna to built a velocity profile. the maximum velocity and acceleration are being given, when a Position command is received, the program will generate a trapezoidal profile with the given maximum velocity and acceleration. 
    can i use a mat lab node to get the velocity and out put the position continuously?  
    if can not, is there any other  to do it. Please help me out of this, thanks a lot!

    Attachments:
    ma.png ‏34 KB

  • NI Motion assistant Position Profile

    HiI am trying to use NI motion assistant to generate position profile so that I can output to ESP300(Newport stage controller) for UTM500cc.1(not supported by NI I guess).
    The thing is when I convert the Labivew code, it looks there no way to get position profile from the vi. I need to have the NI hardware to run that vi too.
    Is there any way to get position profile from NI motion assistant?
    Brad
    Solved!
    Go to Solution.

    Hi changlin!
    Have you tried the Get Straigt Line Move Profile VI available on the Motion Assistant palette in LabVIEW?
    Kristen H.

  • To generate xml code in encoding  as specified in system profile options

    Hi,
    i have a customer bug wherein the report page which is generated after a particular process, which is a .xml file, does not open because we have special characters which are not getting encoded properly!..
    the probable solution to this would be to encode the .xml file in the encoding format specified in system profile options.
    After the content generation the following code is used to generate the tags and the .xml page:
    DBMS_XMLGEN.setRowSetTag(l_qryCtx,'INVOICE_SET');
    DBMS_XMLGEN.setRowTag(l_qryCtx, 'INVOICE_RECORD');
    DBMS_XMLGEN.setBindValue(l_qryCtx,'BATCH_ID', p_batch_id);
    DBMS_XMLGEN.setBindValue(l_qryCtx,'SUPPLIER_ID', rec.supplier_id);
    DBMS_XMLGEN.setBindValue(l_qryCtx,'SITE_ID', rec.site_id);
    l_result_clob :=DBMS_XMLGEN.GETXML(l_qryCtx);
    l_result_clob := substr(l_result_clob,instr(l_result_clob,'>')+1);
    l_temp_invoice_count := DBMS_XMLGEN.getNumRowsProcessed(l_qryCtx);
    l_invoice_count := l_invoice_count + l_temp_invoice_count;
    DBMS_XMLGEN.closeContext(l_qryCtx);
    clob_to_file(l_result_clob);
    here we have a transaction type in portugese like Nota de Crédito
    and the issue summary is as follows
    It contains some foreign language symbols which are not encoded in UTF-8 format hence IE is showing the error. Even though in mozilla the file is completely opened but the same foreign language symbol is not shown. So the error exists in all the browsers.
    can you please suggest how the encoding maybe done so as to avoid the above problem!...
    and also how to include the encoding as per mentioned in the system profile options.

    Hi,
    >>>The XSD doesn't have any messages only simple and complex types - I can't seem to relate (via drag and drop) them to a data or message type to generate the required objects.
    maybe it has some reference inside to some other types which you did not get?
    if so you need to import into IR/ESR all files and put the correct reference (external archives)
    this would be the proper way to get the file generated according to the xml schema
    Regards,
    Michal Krawczyk

  • Trace is still getting generated even after disabling the profile option Initialization SQL Statement - Custom

    Hi All,
    we have a problem with profile option "Initialization SQL Statement - Custom". we have set this at user level. after some time, we have cleared the profile option value for this user.
    But we can still see the generated trace files are getting updated. we did checked this trc files from path returned from below query.
    select name, value
    from   v$parameter
    where  name like 'user_dump_dest';
    Please help us on how to resolve this issue. we are using Oracle Apps R 12.1.2 version.
    Thanks in advance
    Raghava

    Before logging out we suspect that he closed the browser instead of logout link.
    What if you make the user logout, can you reproduce the issue then?
    We have verified the profile options for this user and found that value is cleared for profile Initialization SQL Statement - Custom.
    How do you know that the files were generated for this user and because of this profile option? Have you verified profile options for all users at all level?
    Thanks,
    Hussein

  • Velocity profiling with SoftMotion Module

    Hi Folk,
    I need to move a stepper motor following a velocity profile, i.e. I need to change continuously the velocity while motion is in progress.
    I intend to perform the move with a cRIO platform equipped with a NI 9512 module.
    By using the property & invoke nodes, introduced first in NI SoftMotion Module 2009 SP1, I have created a small test routine to perform my task.
    I have used the property & invoke nodes, instead of the function blocks, because I want to update the velocity profile as fast as possible.
    For the test routine I have used a simulated axis (a servo motor) and the routine is developed by using the scan interface.
    In the main loop, a sinusoidal wave (point by point) generates a sample velocity profile, the velocity is passed to the "velocity" Straigth-Line Move property node and it is applied to the axis by the "Start" Straigth-Line Move invoke node.
    The test routine runs circa correctly until the velocity profile cross the zero, at that time the routine stops with the following Error -77070.
    I have added an offset to the generated sinusoidal profile. The test routine runs correctly if the offset sets the sinusoidal profile all positive or all negative, i.e. the offset is greater than sinusoidal amplitude.
    Question (1)
    I beleave that this behavior is due to a bug in the Straigth-Line Move node. I am right?
    Question (2)
    I have written that the routine runs "circa" correctly because furthermore the previous bug there is a timing issue.
    I have set the Scan Period = 5 ms as it is requested for 951x modules.
    If the timed loop (Synchronize to Scan Engine) is set to 5 scans or more the timing of the timed loop seems to be correct (the sinusoidal wave shows the period that has been configured).
    If the timed loop is set to 4 scans or less the timing of the timed loop becomes longer  (the sinusoidal wave shows a longer period as that has been configured).
    Any idea about this timing issue?
    Question (3)
    Any suggestion how to write a faster velocity profiling with the SoftMotion Module?
    Thanks for your help,
    Asper
    P.S.
    Error -77070 occurred at Invoke Node in Axis_Velocity_profiling.vi
    Possible reason(s):
    NI SoftMotion:  A Start operation is pending. Please add a delay between consecutive preemptive Start Motion calls.
    Attachments:
    velocity_profile_exemple.zip ‏77 KB

    Hi Reid,
    I am developing a system for low-force tests of very thin tissues in tension and fatigue.
    The force is measured with a load cell and is applied by pulling the sample with a linear translation stage and the elongation is measured with a linear encoder.
    The linear stage is motorized with a 2-phase-stepper motor, and with two limit switches. The stepper is designed for applications with very limited space conditions and the motor is hollow.
    The linear encoder has a 20 nm resolution and a 1 um accuracy, and includes an electronic for signal conditioning that is compliant with the encoder input of the NI 9512 module.
    The load cell is a full bridge with an accuracy better than 0.01 %. For acquiring and conditioning the full bridge, the system uses a NI 9237.
    The system will provide tests that are controlled both in force and in elongation.
    For the tests controlled in force, the loop is closed with the signal measured by the load cell and the translation stage is driven in velocity.
    For the tests controlled in elongation, the loop is closed with the encoder signal and the translation stage is driven in position.
    For both type of tests, the user can select different test profiles, for example: a linear increasing, a sinusoidal profile for fatigue test, etc.
    The user can pause the test at any time, and the system must take the condition, until the next proceed command.
    My previous post: question (1)
    Your reply:
    I ran the code  Axis Override Test 1 on my machine on a simulated Axis and this was the performance I observed:
    Our versions maybe differing did you see the same behavior on a simulated axis?
    Concerning the velocity that is read from the Read (Data) function block, I observe the following:
    With a simulated axis (both in My computer and in cRIO-9073) the values are positive for forward move and they are negative for backward move (as you also have observed).
    With the real axis (NI 9512) the values are positive both for forward move and backward move.
    Please see the next images.
    With simulated axis
     With real axis (NI 9512)
     My system is as follows:
       LabVIEW: 9.0f3
       SoftMotion: 9.0.1
       NI-Motion: 8.1.0.3037
       NI-RIO: 3.3.1
       NI-RT: 9.0.0
    I want to point out that the simulated-axis is a servo drive while the real axis is a stepper drive (NI 9512).
    With my software release, I believe that this behavior is due to a bug, probably in the stepper drive interface. I am right?
    I suggest that you try on a real stepper axis (NI 9512).
    My previous post: question (2)
    Your reply:
    These two questions I feel share the same root cause. It takes a little bit longer to calculate the a preemptive move in the opposite direction.
    Considering the observation on the Read (Data) function block issue, now I note that my second question arises from the sum of two different behaviors. In case the Read (Data) function block issue is solved, as for simulated axis, the sentence can be rewritten as:
    The velocity plot shows some computation troubles as the velocity is approaching the zero, with the derivative both positive and negative.
    Furthermore I have discovered that this computation troubles gives a blocking error if the velocity is approaching the zero with a zero derivative.
    Once the velocity reaches the zero with a zero derivative, the "Velocity Override" Write is no any more able to change the velocity!
    No errors or warnings comes out in this situation!
    This behavior is true with an axis both real and simulated, and is still true both with an all function blocks code and a mixed function blocks/invoke nodes code.
    From this point of view, the velocity troubles with the approaching to zero are very very bad!
    Please consider that in the previous posted example you can find an all function blocks code, Axis Velocity Override_test_0.vi, and a mixed function blocks/invoke nodes code,  Axis Velocity Override_test_1.vi.
    You can easily test the velocity blocking error by putting the parameter offset = amplitude in the previous posted example.
    My previous post: question (3)
    Your reply:
    I am curious if you are observing that around zero % the override function performs poorly, was this present on the function block example? I think the problem here is the preemptive move being called from the straightline move function.  Basically, the trajectory generator is still calculating points when send the command to it. Since we are updating the velocity at a  very fast interval we notice some of this breakup due to the longer latancy times. Even with this
    Error -70216 occurred at an unidentified location
    Possible reason(s):
    Motion:  A required resource is busy and unable to accept further commands at this time.
    To get around this error you will need to call into the trajectory generator at a slower period of time to allow it to finish the operation in progress. Keep in mind the control loop we are calling into in RT is the command loop to the trajectory generator and the position control loop is performed on the FPGA of the module itself.
    I want to underline that the computation troubles as the velocity is approaching the zero has not apparent connection with the Error -70216.
    I have tested the posted routines with Scan Period = 5 ms and the Number of  Scans = 5 or more (25 ms for cycle or more) and the computation trouble is still there every time that the velocity is approaching the zero.
    The Error -70216 come out randomly and increases as the cycle time decreases.
    I did not observe any decay in the time to perform the Velocity Override around zero %, but you have to consider that I did not make any test to investigate this issue.
    I agree with you, the Error -70216 can arise from some commands that try to access the same resource a the same time.
    In my opinion the Velocity Override has to be predominant, i.e. no matter what the routine is actually doing, the routine should start immediately to correct the actual velocity to reach the new value.
    Suggestion: for the future release of the Velocity Override, please consider to leave the opportunity to select from percentage velocity (as it is now) an absolute velocity.
    Regards,
    Asper

  • Motion assistant: Cannot convert to LabView file

    Hello,
    I would like to ask for help on problem:  the file generation from Motion assistant to Labview
    Background:
    1.  Use Motion assistant to generate 2 or 3 steps of motion.
    2.  Save it.
    3.  Inside Motion assistant, Use Tools>>Generate Code>>LabView Diagram.
    Result:
    After I doing this, the LabView file is generated.  But, it is a file containing a few control switch (without any other key components to produce the motion control function).
    Thus, what is the problem behind?   
    Thanks
    James

    Dear Jochen,
    I had tried what you said.
    1.
    Treat read-only VI as locked              :  uncheck
    Enable window explorer for LLB file  :  check 
    Note: basically, I have reset the machine after set the options
    2.
    Uninstall Ni-motion ->  no-reboot -> install again
    After I have do this steps individually,  Nothing has corrected.
    What is the problem then?
    Regards,
    James 
    Note:
    Attached please find the Motion assistant source file for your reference
    Attachments:
    Motion-Part2b.vi ‏9 KB

  • Motion Assistant

    Hi,
    What is the defined behavior for Motion Assistant API contour mode
    (NIMASetMoveParams) when it receives duplicated XY points?
    For example, if I pass coordinates that define a square
    0,0
    10,0
    10,10
    0,10
    0,0
    this isn’t result in square because of the cubic spline. To force a discontinuity
    (C2 and C1) I can replicate two times each point.  For example:
    0,0
    10,0
    10,0
    10,0
    10,10
    10,10
    10,10
    This is valid in spline theory. What the API will do in this case?
    Thanks.

    Hi David,
    I tried to feed Motion Assistant with replicated data. Neither Motion Assistant
    application nor the API generates any kind of error. Based on the resulting
    shape (not a square, but something that resembles a drop) I think that the
    redundant data is being ignored.
    You said
    that after the acceleration, M.A. will keep the velocity constant. This is not
    always the case as I discussed in e-mail support “(Reference#7107453) Motion
    Assistant contouring behavior”. There are situations that the algorithm of the
    contour mode (or smart contouring feature) implemented in M.A. changes the
    velocity during the motion.
    Another different
    behavior is the M.A contour mode and the contour mode implemented in the PCI
    7344 is that the board doesn’t ignore redundant data as is stated by S. Arves
    S. in my post http://forums.ni.com/ni/board/message?board.id=240&message.id=3443#M3443
    It will be
    very helpful a detailed specification about the rules for the smart contouring implemented
    in M.A. and the contoured mode implemented in PCI 7344. I’m sure that this will
    help everyone do a better use of these products.
    Thanks.

  • Motion assistant labview

    hi
    I have to control a motor speed using the PcI 7342 controller.
    I have MID 7654/7652 servo motor drive and NI motion assistant.
    MY hardware connections are proper.
    I am using motion assistant to generate a arc move and then generating labview code .
    I have inserted just a knob in the front panel to control the speed and made a slight modification in the block diagram to insert the knob in the place of velocity.
    Now i am not able to stop the motor .
    Can anyone help me to insert a stop button in the labview diagram.
    Should i use configure inhibit output flex or just use the stop button in flex motion.?
    i have attached the labview diagram....
    Pls help me.
    thanking you
    sumitha ravindran
    Attachments:
    labvie diagram.vi ‏49 KB

    Hello Sumitha,
    The code generated by Motion Assistant is designed to run the arc move once and stop at the end of the move. The Arc Move step of the LabVIEW diagram is setup to wait until the move completes before stopping. There should be no need to add a stop button (or the Stop Motion VI) if the motor is configured properly. If this is the case, you should see the VI hanging in the Arc Move step. Is this what you see? Can you perform a straight line (point-to-point) move?
    I noticed that you have another similar discussion forum post here. You most likely will need to solve the motor configuration issue first (which may also solve this issue).
    Best Regards,
    Jesse D.
    Applications Engineering
    National Instruments

  • Motion Assistant 1.2 move constraints issue

    Hello,
    I have a contoured motion profile that I want to run using Motion Assistant 1.2 but I don't want to apply move constraints. So I have loaded my data points into a contoured move step and checked "Do not apply move constraints to the curve" option. But even with option enabled, Motion Assistant is applying the values of the Move Constraint tab.
    I'm used to this on a previous version of Motion Assistant.
    Is there an additional step in this version or is bug ?
    Thanks.

    Hello,
    I have a contoured motion profile that I want to run using Motion Assistant 1.2 but I don't want to apply move constraints. So I have loaded my data points into a contoured move step and checked "Do not apply move constraints to the curve" option. But even with option enabled, Motion Assistant is applying the values of the Move Constraint tab.
    I'm used to this on a previous version of Motion Assistant.
    Is there an additional step in this version or is bug ?
    Thanks.

  • Motion Assistant Contour Array Points - Optimal Array Size?

    I am working with the NI Motion Assistant API and plyaing around with the Contour Move generation where I feed a set of X, Y target points to the Set Contour Move Properties.
    One of the inputs is Profile Calculation Constraint - Array Size, Constraint Value (which would be the array size to use).
    I am wondering if there is a way to calculate the "optimal" array size for any particular move?  I know I can have too few - can I have too many points in an array (being reasonable here and not planning to use the whole 2^32 size allowed).
    Thanks.
    Ryan Vallieu
    Automation System Architect

    Hi Ryan,
    Unfortunately, I'm not so sure I have a good answer for you. I'll evaluate some of the pros and cons below and then ultimately make a recommendation:
    Constraint Type: Array Size
    Pros
    You always have a fixed sized array of setpoints. If you are using a 73xx card, this simplifies setting up your contour buffer. It also avoids using a lot of memory.
    Cons
    For long moves, you could have a long time and large distance between position setpoints. The motion card will do a spline interpolation to smooth the move, but the splining algorithm is only so good.
    If you are sending the contour setpoints to a motion card, you don't know the interval between setpoints (although this isn't difficult to obtain).
    Constraint Type: Sampling Time
    Pros
    Regardless of the move, you always have a fixed time between setpoints. As long as your sampling time isn't too large, even fast moves should execute accurately.
    Cons
    For a long move, you could generate a lot of setpoints that consume a lot of memory.
    Setting up contouring buffers can be trickier.
    Conclusion
    It depends on what you expect the end customer to be doing. I prefer using the sampling time constraint since it is more robust for fast, long moves (and still good for slow, short moves). It will make creating contour buffers more difficult, but there is an example (Two-Axis Smart Contouring.vi) that shows how to dynamically update the buffer. Ultimately, I think it is better to focus on accurate moves than minimizing memory consumption.
    If you decide to go with the sampling time method, I would start with a constraint value of .01, since 10msec is the shortest interval when configuring a contour buffer. Try and generate some position profiles to see how big the arrays are. For optimizing, it is just a tradeoff between array size and the accuracy of the generated motion profile.
    Thanks,
    Paul B.
    Motion Control R&D

Maybe you are looking for