Jump to content

infinitenothing

Members
  • Posts

    362
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by infinitenothing

  1. If the red dot is scary, you can just drop in a "to fixed point" in there. It explains the conversion (rounding mode and overflow mode) a bit better. In this case, the output is exactly the same as the input in the same way that 16 is the same as 16.0.

     

    to fixed point.png

  2. I don't have a canned solution for velocity profiles. I'm sure there's something nice out there. It might be possible (though, probably there's quite a bit of effort involved) to roll your own controller. You could use a 9401 to output a PWM signal to something like an H-bridge, if you're micro-stepping, you'll have to use another module, maybe a 9221, to measure the current out to the motor, etc.

  3. To clarify the previous post, the two loops can share a wire as long as that wire is an input to both of them. If the wire is an input from one and an output to the other then the loop that is expecting the input will have to wait for the other loop to output the data.

    If you intended to use that wire to communicate data between the two loops, maybe convert the wire between them to a channel wire?

     

  4. I'm not too familiar with the FIFOs so I can't answer those questions but I noticed your error handling is a little weak and doesn't capture errors while you're inside the loop.

    Usually you want to run your timed loop at your control rate (some target rate you choose). It's a little less common to try and run it losslessly as you might trying to do. If you wanted to run losslessly, you could maybe set the loop time to 0 or maybe create a timing source from your task:

    http://zone.ni.com/reference/en-XX/help/371361R-01/glang/create_timing_source/

  5. 16 hours ago, SteveSun said:

    I want to implement a function as follows: first set the Max and Min voltage values, then set the number of steps in the middle of the Max and Min steps and the dwell time of each step, and finally set the total number of cycles
    The problem is: the value of each step must be output separately, there is a problem here, please help, thank you!

    I think you need to replace your rotate array with another for loop with your wait inside. The inner for loop will autoindex your array and output the values one by one. If you post a VI or a snippet, we might be able to better show you what we mean.

  6. 5 hours ago, ShaunR said:

    I know you are looking for the most precise method for this type of waveform, but is there a reason you can't do a peak detect to remove the lead-in?  

    At this point, AutoCorr is working well enough and I'm just curious about the advantages and disadvantages of different methods. My signals are rather noisy so it's not always super clear how far back the "start" is from the trigger.

  7. On 2/9/2019 at 7:45 AM, Francois Normandin said:

    If you need to track frequency in a noisy realtime environment, I've seen Kalman-based filtering being used. 
    Unfortunately, I don't have an implementation example to provide. NI has this discrete filter in the Control Design and Simulation toolkit... which does not come cheap.

    Interesting. I've seen its use in things like GPS. Actually, in my particular application, I'm not tracking a frequency. There's some "dead air" which I simulated above with the zeros and then the signal which is unrelated to the previous signal. Does that rule out Kalman or am I misunderstanding how you'd use it. I have the platform suite so I think I have the control design toolkit.

    On 2/9/2019 at 9:05 AM, ShaunR said:

    Mhmm..yeah... I know some of these words. 😉 I'll take a look at some of the algorithms they mention.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.