12-12-2005 11:15 PM
12-14-2005
10:24 AM
- last edited on
02-19-2025
12:25 PM
by
Content Cleaner
Hi Simon,
In your post you said that you want to have some sort of sync pulse that will then trigger a continuous pulse train that looks like you showed in the image on two of the lines. It sounds like what you are trying to do would best be accomplished by a counter/timer board (Counter/Timers). Those boards would allow you to easily do a single pulse generation on one line and then on two of the other lines allow you to set the initial delay that you need and then make those pulse trains with the specified pulse characteristics. This would be pretty easy to program and sounds like the best case for your conditions.
However, since you stated that you are working with the 6534, then I understand that you may be limited to that hardware. If that's the case, then you will need to write the data, but be fairly careful about how it's done. One thing to keep in mind is that by default, the board will regenerate the data that you send it; however, since you need the different pulse specs at the beginning you will have to use the following command:
int32 __CFUNC DAQmxGetWriteRegenMode(TaskHandle taskHandle, int32 *data);
where int32 =
DAQmx_Val_DoNotAllowRegen | 10158 | Do not allow NI-DAQmx to regenerate samples the device previously generated. When you choose this value, NI-DAQmx waits for you to write more samples to the buffer or until the timeout expires. |
Your code will then have to look something like this:
You will have to make the data that you want to write and have it as a 2D Array with one row of the array for each channel.
While the above method should work, I would still recommend the Counter/Timer board as it will make your life much simpler because it is designed specifically for the type of pulse train generation that you are attempting to do.
Regards,
12-14-2005 04:15 PM
12-14-2005 07:20 PM
12-14-2005 10:33 PM
12-18-2005 06:22 PM
12-19-2005 03:36 PM - edited 12-19-2005 03:36 PM
Message Edited by Otis [DE] on 12-19-2005 03:37 PM
Message Edited by Otis [DE] on 12-19-2005 03:38 PM
01-04-2006 11:48 PM
01-11-2006 11:55 PM
01-12-2006 04:28 PM
Hi Simon,
As stated in an earlier post, if you want this type of behavior then you would
be best suited to using a counter/timer board. However, since you need to
use digital lines, you will have to use the Non-Regeneration property in order
to not keep repeating the Sync pulse in your output operation. That means
that you cannot begin outputting the pulse with the onboard information, so you
will have to keep writing new data to your output.
If you decided to just use onboard regeneration, then you can either not
include the DAQmxGetWriteRegenMode(TaskHandle taskHandle,
int32 *data); line of code, or set the data to DAQmx_Val_AllowRegen.
Regards,