casu,
Hi again. Good news -- I've got an example that's fairly close to doing what I think you need. Unfortunately, my network PC isn't near any LabVIEW pc so I can't tweak it right now, but let me point you to an example I posted in another
thread.
You could use the same idea with one master pulsetrain that drives your other 6 derived "divided-down" pulsetrains. In your case, you would use 3 high ticks and 3 low ticks for all the divided counters, but the initial delays would be different to create the offset pattern you need. I'd recommend the values 8,5,4,7,6, and 9 ticks to generate the pattern you posted. (The reason why is in the last paragraph.)
Also, you can see in that example that the master pulsetrain can be stopped and re-started which causes the divided counters to also stop and re-start
while staying in sync. You would also be able to change the master frequency without stopping it to provide a smooth change in speed to your 6 switches, i.e., the sinewave driving your motor.
One quick gotcha to watch out for. I worked with NI support a few months ago about some quirks in the initial delay. I think that if you ask for 0,1, or 2 ticks you get 2. If you ask for 3 you get 4. But if you ask for 4 or more you get exactly what you want. Something like that. I think there might have been some additional criteria involving the # of low ticks also. In any event, the lesson I took away from it was that if you're going to specify an initial delay, use 4 or more ticks.
-Kevin P.
P.S. While you *can* change the motor speed on-the-fly, you aren't going to get high-speed real-time motion control this way. I don't know what the DSP *actually* did, but it easily could have been doing far better motion control than you can hope to achieve under Windows. Not to be a downer, but just to forewarn you that there is a point where the problem stops being your code and starts being the Windows OS.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.