From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-17-2014 09:51 AM - edited 06-17-2014 09:52 AM
Hello,
I have a little problem with my VI who is made for driving a biphased stepper motor:
When I change dynamically the output frequency of my DAQ Generaor, I have some weird effect (see picture). It happend progressivelly like this :
(the start frequency doesn't matter)
95Hz - nothing
95-100Hz progressivelly grow
100Hz :
100-105 Hz degressive
105Hz - nothing
So I generate 2 phases with a rate of 1M and 100k for sampling. All other stuff are set with the same settings.
My device is an NI USB-6356 (1.25MS/s/chanel)
I have tried to set all things at 100k but when I do that my motor won't turn.
Does anyone know why it does this ?
Thank you in advance 😉
06-18-2014 01:29 AM
I assume you are talking about the phase discontinuity. I would be suspicious of the Express VIs you are using.
Mike...
06-18-2014 01:48 AM
Hello Mike,
I use 2 simulate signal setting in sine : see Capture2.png
and both DAQ Gen and Acq : Capture3.png / Capture4.png
06-18-2014 07:25 AM
You need to write more samples.
If you're only writing 100k samples into the buffer and sampling at 1MS/s, you have 0.1 seconds of sample.
This is only good for frequencies which fit an integer number of cycles into 0.1 seconds.
You'll be good at each 10 Hz increment. You'll have discontinuities in between.
06-18-2014 08:08 AM - edited 06-18-2014 08:09 AM
Hi Taki,
So I'm blocked .. because with a number of samples superior to 100k it's too slow and my VI doesn't work.
So thanks you guys 🙂
06-18-2014 08:24 AM
What's too slow?
How are you running this?
What frequencies are you trying to work with?
For 100 Hz, you'll be fine with 0.1 seconds of sample. (Even 0.01 seconds of sample would work)
For 95 Hz, you need to fit 95 cycles in a second so you need 0.0105 seconds of sample.(or some integer multiple)
For 105 Hz, you'll need .0095 seconds of sample or some integer mulitple to avoid the discontinuity.
If you change frequency, you'll also need to change the number of samples in your buffer or change your sample rate.
06-18-2014 09:19 AM - edited 06-18-2014 09:34 AM
Because when I set the sampes over 100k i have this message : see Capture5.png
The VI is on my first post, and it's running in a while loop.
I want to be able to work since 1Hz to 10kHz.
And if I set the rate lower, my motor won't turn ..
P.S I haven't any probleme with discontinuity when I start at any value (95 , 100 105 Hz). The problem appear if I change theses values during the run of the VI.
06-18-2014 09:38 AM - edited 06-18-2014 09:39 AM
Ah. I didn't notice that the Express VI calculates an integer number of cycles so it takes care of the initial configuration on first run.
Looks like it isn't doing it properly on subsequent runs.
Your posted VI didn't include the while loop so I got a little confused.
I think you'll have to break away from the Express VI or find a way to force it to reinitialize.
06-18-2014 10:52 AM
This little VI is take in my Main VI. so I have built the loop in the main VI.
I will look for this modification