Error -1074115931 FGEN Pulse Width is Outside Range

Updated May 8, 2023

Reported In

Driver

  • NI-FGEN

Issue Details

I am generating a marker event on a PFI line using NI-FGEN. I can set the marker event pulse width, but when I try to make the pulse width longer than 640 ns, I get an error -1074115931 which says that the event pulse width is outside the legal range. How can I make the marker event pulse longer than the allowed range? 

 

Solution

Marker event pulses are generally set up to be triggers and are seldom required to be very long in time. However, there may be situations in which it is necessary to expand the marker pulse width beyond the allowed range. This can be accomplished by configuring the output behavior of the marker event to be of a toggling type as opposed to a pulse type. The output behavior can be changed by setting the Events:Marker:Output Behavior Property to Toggle. Using this type of marker output behavior, you can toggle the marker by calling it multiple times during the waveform generation when using scripting. 

The attached example Longer Marker Width VI demonstrates how to use scripting to call the marker event multiple times. The line Generate wfmSquare marker0 (0, 100) in the script generates the marker event. This line commands the function generator to output a square wave and a marker event. The 0 after the parentheses means that the marker will be toggled at position 0 of the square wave (the beginning). The 100 means that the marker will again be toggled at position 100. Since the first toggle marker event puts the marker high, and the second puts the marker low, you have effectively created a pulse of 100 samples.