07-08-2019 12:38 PM
Hi All,
I am using USB6215 and want to generate different squar wave frequencies with it.
It works fine when I try to genrate different frequencies up to 40 KHz that I need.
The problem is that the only way that I found to change the frequency from 40KHz to 20KHz, was
disposing the task and again making new task and write new data to it.
it takes about 55 ms abut I have to do it in less than 2ms because I am simulating a kind of frequency modulation.
the goal is to generate 40KHz, 20KHz and 8KHz eachone for about 1.5 to 2 ms and it will be decided at runtime that which frequency should be generated now.
Do you know how I can do it?
Thanks a lot for your help.
07-10-2019 06:10 AM - edited 07-10-2019 06:14 AM
Hello sorena,
You have at least two possibilities, which one to use depends on your requirements:
07-10-2019 10:49 AM
Hi,
Thanks for your guide but still I have two more questions:
- Can I use the counter task in Analog output? if yes can I update its frequency while the task is
runing in C#.
- Actually I am struggling with controlling Continuous Generation in C#, whenever after first time I try
to write data in a task stream by writer object I get error. Do you have any sample source code that
can help me to find it?
Best regards,
Sorena