Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

niRFSG Get Fgen Session

Hello,

 

I would like to port a LabVIEW signal generator program to C# .NET.  It has been fairly straight forward except for an advanced .vi the LabVIEW program contains call "niRFSG Get Fgen Session.vi".  This VI requests the attribute NIRFSG_ATTR_FGEN_SESSION (0x118C4C) which is the current FGEN session being used by the main niRFSG session.  The FGEN session handle is used to configure advanced marker event attributes.  Is there a way to replicate this function in .NET?

 

Shawn

 

fgen.png

0 Kudos
Message 1 of 3
(1,977 Views)

Hi Shawn,

 

I did a bit of digging, and the VI you mentioned is not on the palettes or searchable in LabVIEW. I believe it to be a relic leftover from the way things used to be done in RFSG.

 

Is the LabVIEW source code you are working from something you can share in it's entirety or at least a larger picture? I believe this VI was typically used to extract session information for T-CLK. With newer versions of the driver you can use "niRFSG Get Session Reference.vi" to get an RFSG session and use that directly instead of needing to get the FGEN session. I think this new VI is equivalent to 'niRFSG_GetAttributeViSession'

 

More information on this topic can also be found here: https://forums.ni.com/t5/LabVIEW/NIRFSG-ATTR-FGEN-SESSION-attribute/td-p/1258444

 

Thanks,

Alex

Alex W.
0 Kudos
Message 2 of 3
(1,962 Views)

Hi Alex,

 

Thanks for the help.  I've attached a complete image of the .vi for reference.  The code extends a single marker event in the RFSG script to a multi-ms length trigger pulse for the UUT.  The signal generator is a PXIe-5673.  If there is a more modern way to accomplish this task with the latest drivers I can convert to that method.  For now I'll try to implement the method suggested in the topic you referenced.

 

I only see the export option for marker events in the .NET support:

// Export the marker event to the desired output terminal
_rfsgSession.DeviceEvents.MarkerEvents[0].ExportedOutputTerminal = RfsgMarkerEventExportedOutputTerminal.Pfi1;

 

Shawn

 

fgen.png

0 Kudos
Message 3 of 3
(1,956 Views)