casu,
I'll reply to both your recent messages at once. I think this time I have more questions than answers b/c your recent postings made me realize that I don't understand your overall needs well enough.
I think am going to use digital instead of counter... Maybe you should, maybe not. I'm not sure I really understand your timing needs, both absolute precision and channel-to-channel synchronization. I personally am kinda fond of counters, but they are a bit of a learning curve when you first start using them. An app that needs to synchronize 6 of them seemed like a tough 1st project, so I suggested DIO b/c it would be easier to discuss conceptually and might actually work if you can live with imperfect timing.
Can you describe more exactly what each of these 6 pulsetrain bits needs to do? What is the typical timing for low and high times? Do you need the 6 pulsetrains to operate entirely independently, or should their timing be synchronized somehow?
what is the purpose of writing some particular pattern (all high or low) at the end of the loop ? I remembered you mentioned driving an inverter switch and just figured you'd want to turn everything off at the end of the program. I was guessing that an all high or all low pattern would accomplish that.
how do I modify the example so that each bit will have different delay instead of the whole channel? Do you mean that the 6 pulsetrain bits do not need to be in sync with each other? If they are independent, you may be better off reverting to counters again.
in the example you send to me (DIO pattern.vi) there is a signal distortion in between when the vi checks the while loop before it starts writing again What kind of distortion do you see?
instead of the vi checks the while loop everytime when it finishes writing I want to write the data continiously until the user press the stop button or some error occured That example should keep looping around and writing "continuously" -- the DAQmx Write call is made at regular intervals to change the output pattern. If you want the hw to do all the work of writing continuously, then we're back to using the counters again.
Please provide details about the pulsetrains you need, what you are accomplishing with this changing pattern, what the timing needs are, etc. More details will help us help you better.
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.