Modifying Code for Your Needs
- Updated2024-07-03
- 2 minute(s) read
Modify the RF Recording Software reference examples for your system and application.
Remote Recording
Use StreamCreateConfiguration to configure for remote recording. For example:
client.StreamCreateConfiguration(“remote_stream_config”, RpsType::StreamType::REMOTE, RpsType::Unit::SECOND, 60);
Where :
- remote_stream_config is the task name
- REMOTE is the streaming type
- SECOND, 60 is the duration
Local Recording
Use StreamCreateConfiguration to configure for local recording. For example:
client.StreamCreateConfiguration(“local_stream_config”, RpsType::StreamType::LOCAL, RpsType::Unit::BYTE, 81920000);
Where :
- local_stream_config is the task name
- LOCAL is the streaming type
- BYTE, 81920000 is the duration
Fetching
Use StreamCreateConfiguration to configure fetching. Fetching does not require the stream translator or the data server to be running. For example:
client.StreamCreateConfiguration(“stream_config_name”, RpsType::StreamType::UNSPECIFIED, RpsType::Unit::SAMPLE, 800);
Where :
- stream_config_name is the stream configuration name
- UNSPECIFIED is the fetch streaming type
- SAMPLE, 800 is the fetching sample quantity
Channels
When calling AcquisitionCreateTask, the number of instrument names corresponds to the number of channels (and number of licenses) used by RPS.
For a single-channel example:
client.AcquisitionCreateTask(“single_channel”, “5841_00”);
Where:
- single_channel is the task name
- 5841_00 is the channel
For a multi-channel example:
client.AcquisitionCreateTask(“multi_channel”, “5841_00,5841_01,5841_02,5841_03”);
Where:
- multi_channel is the task name
- 5841_00,5841_01,5841_02,5841_03 are the four channels
Use StreamSetDestinationEndpoint to set endpoints for the channels' output data.
For a remote streaming example:
client.StreamSetDestinationEndpoint(“remote_stream_config”, RpsType::StreamDestinationEndpoint::FILE, “ch0,ch1,ch2,ch3”);
Where :
- remote_stream_config is the stream configuration name
- ch0,ch1,ch2,ch3 are the four destination endpoints for streaming
For a local streaming example:
client.StreamSetDestinationEndpoint(“local_stream_config”, RpsType::StreamDestinationEndpoint::FILE, “F:/ch0/ch0.tdms,F:/ch1/ch1.tdms,H:/ch2/ch2.tdms,H:/ch3/ch3.tdms”);
Where :
- local_stream_config is the stream configuration name
- F:/ch0/ch0.tdms,F:/ch1/ch1.tdms,H:/ch2/ch2.tdms,H:/ch3/ch3.tdms are the four destination endpoints for streaming
Phase Calibration
Use AcquisitionSetPhaseCal to specify the phase calibration type. For example:
client.AcquisitionSetPhaseCal("acq_task", RpsType::PhaseCalType::COHERENT);
Where :
- acq_task is the task name
- COHERENT is the phase calibration type
LO Calibration
Use AcquisitionSetLO to set LO calibration. For example:
client.AcquisitionSetLO("acq_task", RpsType::LOType::STAR_CALIBRATED);
Where :
- acq_task is the task name
- STAR_CALIBRATED is the LO sharing configuration type
Synchronization
Use SynchronizationCreateConfiguration to enable synchronization. Ensure that you set a master task with SynchronizationSetMasterTask, even if you only have one task. RF Recording Software supports single tasks.
client.SynchronizationCreateConfiguration(RpsType::SynchronizationType::SC_SCH); client.SynchronizationSetMasterTask("acq_task");
Where :
- SC_SCH is the single-controller, single-chassis synchronization type
- acq_task is the master task name
Related Information
- Performing Acquisition Phase Calibration
Acquisition phase calibration is a required step to use multichannel relative phase and amplitude corrections on your system. Acquisition phase calibration adjusts the relative channel-to-channel phase and amplitude performance of the VSTs. Successful calibration results in a calibration file or files being saved to disk on the PXIe controller.