Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

RFSG Script for falling edge trigger

Hi, 

 

I am trying to trigger a pulse on PFI0 port of NI PXIe-5673E. the reference waveform is a modulated signal from RF OUT of 5673E. 

 

I am generating a modulated signal and on the falling edge of the signal i would like to trigger a pulse out of PFI0 port which is 1ms in width. Currently, with this code i am getting an error.

 

"niRFSG Write Script.vi<ERR>The AWG reported the following error:

Invalid Marker.

Marker specified in a generate instruction exceeds the waveform boundaries.

Change the marker position or positions to fit within the waveform, or increase the size of the waveform."

 

However the error is due to the I and Q data of the pulse being feed incorrectly which i am trying to figure out. Also, the main goal is to achive the 1ms of width for the pulse from the PFI0.

 

Please see attached code and the goal that i am trying achive. 

 

Thanks, 

Ankit

Download All
0 Kudos
Message 1 of 6
(6,326 Views)

Hello Ankit,

 

Thanks for the detailed post. I see what you are trying to achieve. May I first ask a couple of questions to getter a better understanding of your setup and issue:

 

Why do you think that the error is due to the data being fed incorrectly?

 

Do you know what the size of your waveform is?

 

With your NI 5450, are you taking into account the quantum, that a marker position must be placed at an integer multiple of 2 samples?

 

This document should help with achieving the 1 ms pulse width. http://zone.ni.com/reference/en-XX/help/370524R-01/siggenhelp/ni_5421_markers/

 

Document to help with scripting: http://www.ni.com/white-paper/7285/en/

 

Best regards,

0 Kudos
Message 2 of 6
(6,298 Views)

Hi Mr.Anderson, 

 

The first link (This document should help with achieving the 1 ms pulse width. http://zone.ni.com/reference/en-XX/help/370524R-01/siggenhelp/ni_5421_markers/) is based of the NiFgen not NiRFSG. Do you think the same goal can be achived by NiRFSG? I tried looking for the " Marker Event Pulse Width property or theNIFGEN_ATTR_MARKER_EVENT_PULSE_WIDTH attribute" but did not find it under NiRFSG. Even in the pallet i did not find any function to set the Marker Even Pluse Width. 

 

I think i might have to explore other options such as Script Event, Start and End Event options for niRFSG Export Signal VI 

 

I have yet to learn about this options Do you know if i can achive the 1ms goal by using one of the option i listed above, if so how?

 

Thank you, 

Ankit

 

 

 

 

0 Kudos
Message 3 of 6
(6,281 Views)

Hello Ankit,

 

You're right, that was for Fgen. My apologies.

 

Looking at the RFSG driver, you can set the export terminal to PFI1, but when it comes to changing the duration of the marker output, unfortunately this is not exposed in the driver for RFSG. The marker event duration comes from the NI-FGEN driver which is the 5450/5451 that is paired up with the upconverter. There has been a Corrective Action Request filed to R&D to expose these functions in the RFSG driver for users to have control over the marker event duration, however, there is no timeframe for when this functionality could be implemented.

There is a workaround which could possibly allow you to change the pulse width duration of the marker event. There is a hidden VI available in a .llb library within LabVIEW and the RFSG driver that will expose the NI-FGEN session reference from the NI-RFSG driver. Using this VI will allow you to modify the Marker Event properties in FGEN for use with the RFSG driver. Here are the steps to do this:

1) Go to C:\Program Files\National Instruments\LabVIEW 2014\instr.lib\niRFSG\niRFSG.llb using Windows Explorer (File path may vary for your machine and LabVIEW version)
2) Scroll down in the LLB Manager to niRFSG Get Fgen Session.vi. Double click the listing of the VI.
3) With the front panel open for that VI, click and drag the icon in the top right of the window to the Block Diagram of your actual application.
4) Wire the FGEN reference into an FGEN property node, and change the Marker Event properties.

More information on changing the Marker Event can be found here: http://zone.ni.com/devzone/cda/tut/p/id/5534#toc4

 

Best regards,

0 Kudos
Message 4 of 6
(6,227 Views)

Hi Anderson, 

 

i was able to find a function which allowed me to pull the reference off the RFSG and create a property node for FGen which then allowed me to set the parameters required for the marker event to occure. 

 

So i did end up getting 1ms of pulse out of PFI0. Please see attached screenshot for my solution. I am busy with project so i will take a look at your recommandation as well from previous post when i have some time. 

 

Thanks for your help,

Ankit

0 Kudos
Message 5 of 6
(6,219 Views)

Hello maxout,

 

Great to hear that you got it working. Your solution is essentially my suggestion. Obtain a reference to the Fgen session to be able to use the Fgen property node. Using that RFSG function is a great idea.

 

Best of luck moving forward.

0 Kudos
Message 6 of 6
(6,201 Views)