Skip to content

Commit 217fad0

Browse files
Modified nirfsg_usage.inc
1 parent b8e0ff5 commit 217fad0

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

docs/_static/nirfsg_usage.inc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
Usage
22
------
33

4-
The following is a basic example of using the **nirfsg** module to open a session to a Function Generator and generate a sine wave for 5 seconds.
4+
The following is a basic example of using the **nirfsg** module to open a session to an RF Signal Generator and generate a continuous wave (CW) signal.
55

66
.. code-block:: python
77

88
import nirfsg
9-
with nirfsg.Session('SwitchExecutiveExample') as session:
10-
session.connect('DIOToUUT')
119

12-
`Other usage examples can be found on GitHub. <https://github.com/ni/nimi-python/tree/master/src/nirfsg/examples>`_
10+
# Configure the session
11+
with nirfsg.Session(resource_name='5841', id_query=False, reset_device=False, options='Simulate=1, DriverSetup=Model:5841') as session:
12+
# Configure RF settings
13+
session.configure_rf(
14+
frequency=1e9, # Frequency in Hz
15+
power_level=-10.0 # Power level in dBm
16+
)
17+
session.generation_mode = nirfsg.GenerationMode.CW
1318

19+
# Start signal generation
20+
with session.initiate():
21+
input("Press Enter to stop generation")
22+
23+
`Other usage examples can be found on GitHub. <https://github.com/ni/nimi-python/tree/master/src/nirfsg/examples>`_

0 commit comments

Comments
 (0)