You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the NI-XNET Bus Monitor, it is possible to run in Subordinate mode. This does not seem to be an option when creating a CAN session using this python library, as far as I can tell.
I would like to replicate the functionality of the NI-XNET Bus Monitor in a python script using this library, but the only way to monitor traffic when multiple XNET sessions are already running is if the Bus Monitor is in Subordinate mode. The can_lstn_only parameter does not achieve this goal. Am I missing something?
import nixnet
database_name = 'CAN'
cluster_name = 'CAN'
input_frame = 'FCC_A_CRC'
interface1 = 'CAN1'
with nixnet.FrameInQueuedSession(
interface1,
database_name,
cluster_name,
input_frame) as input_session:
input_session.intf.can_lstn_only = True
input_session.start()
frames = input_session.frames.read(count)
for frame in frames:
print('Received frame:')
print(frame)
The above code produces this error when the input_session is created:
nixnet.errors.XnetError: NI-XNET: (Hex 0xBFF6300D) You tried to open the same frame twice. This is not permitted. Solution: open each frame only once
The frame has already been opened by the LabVIEW program that is reading/writing over the interface, using the XNET database specified. Again, in the Bus Monitor this is not an issue when subordinate mode is selected. Is this not supported in this library?
OS: Windows 10
Python version: 3.6
NI-XNET version: 18.5
Installed packages and version
nixnet (0.3.1)
pip (9.0.3)
setuptools (39.0.1)
six (1.15.0)
xlrd (1.2.0)
The text was updated successfully, but these errors were encountered:
Using the NI-XNET Bus Monitor, it is possible to run in Subordinate mode. This does not seem to be an option when creating a CAN session using this python library, as far as I can tell.
I would like to replicate the functionality of the NI-XNET Bus Monitor in a python script using this library, but the only way to monitor traffic when multiple XNET sessions are already running is if the Bus Monitor is in Subordinate mode. The can_lstn_only parameter does not achieve this goal. Am I missing something?
The above code produces this error when the
input_session
is created:nixnet.errors.XnetError: NI-XNET: (Hex 0xBFF6300D) You tried to open the same frame twice. This is not permitted. Solution: open each frame only once
The frame has already been opened by the LabVIEW program that is reading/writing over the interface, using the XNET database specified. Again, in the Bus Monitor this is not an issue when subordinate mode is selected. Is this not supported in this library?
Installed packages and version
nixnet (0.3.1)
pip (9.0.3)
setuptools (39.0.1)
six (1.15.0)
xlrd (1.2.0)
The text was updated successfully, but these errors were encountered: