Supported ports

From SweepMe! Wiki
Jump to: navigation, search

COM

A standard PC serial port based on RS-232 protocol typically connected via a 9-pin or a 25-pin D-SUB adapter (https://en.wikipedia.org/wiki/COM_(hardware_interface). COM ports have many parameters that have to be adjusted to connect to a device. The default port properties used by SweepMe! are LineFeed = LF ('\n') as terminator and '9600' as baudrate. These properties can be changed in a Device Class. Please check the default values given in the Device Class.

Troubleshooting

Problem: Port cannot be found

  • Can you see the COM port in the Windows device manager?
  • Are you sure it is the right COM port? Plug in and out your device to see which COM port disappears and appears again.
  • Do you use a USB-to-COM adapter and might have to install a driver first?

Problem: Device does not respond

  • The default parameters are given in the Device Class, use the button 'Open/Modify' to see the default values and whether your device uses the same parameters?
  • Does your device need a crossover cable, also called null-modem cable? https://en.wikipedia.org/wiki/Null_modem
  • Does your device go into a timeout?
  • Have you maybe used the Port Manager ('Ports' -> 'PortManager') and overwritten some port specifications.

Problem: Cannot find COM port using USB as virtual COM port

  • Does your COM port number always change? Use the Windows device manager to define a fixed port number for each USB port. Try to use always the same physical USB port.
  • Have you installed the correct driver to use the USB interface of your device as virtual COM port?

Problem: Device Class programming

  • Is your baudrate and terminator correct?
  • Can you switch the device into remote mode by any command?
  • Even though you might not able to read data from your device, can you set a value and prove a change at the display?
  • Can you reproduce your problem by creating a minimal working example using python and pyserial?

GPIB

An IEEE-488-Bus that is often used to connect measurement equipment. In the field 'Port' of a Device module, a GPIB port is shown as 'GPIB0::xx::INSTR' where xx is a number between 01 and 30. If one GPIB interface is installed, you have to use GPIB0 which is the default suggested port. In case you have multiple GPIB interface, e.g. a GPIB card and a GPIB-to-USB adapter, you can select the correct interface by using GPIB0 and GPIB1 (example 'GPIB1::xx::INSTR') and you might have to change the interface number manually. Please note that the button 'Find Ports' does not really search for ports. At the moment, it displays all possible addresses. Searching for GPIB ports typically takes some time which is why we decided to skip it. In future, we might add such a feature again.

Troubleshooting

Problem: Port cannot be found

  • Do you have installed the ni-visa runtime?
  • Do you have installed the driver for your GPIB card or your GPIB-to-USB adapter?
  • Is the installed driver the correct one and up to date?
  • Can you see your GPIB interface in the Windows device manager?
  • After installing the ni-visa runtime, a program called NI-MAX is available. Can you use it to detect all available GPIB ports?
  • NI-MAX also shows you the GPIB interface number.
  • Do you have multiple GPIB interfaces installed?

Problem: Device does not respond

  • Have you selected the correct GPIB port of the equipment?
  • Check the communication properties of the device.
  • Switch the device off and on again. Often the GPIB address is shown during the startup of the device.
  • Some device support multiple communication ports. You might have to change to GPIB/IEEE-488/HP-IB

Problem: Device Class programming

  • Is your device already older or somehow special and you need to use a different terminator character?
  • Send "*IDN`?" and check the answer. Do you get an identification string?
  • Can you switch the device into remote mode by any command?
  • Even though you might not be able to read data from the device, can you set a value and prove it via the display?
  • Can you reproduce your problem by creating a minimal working example using python and pyvisa?

USBTMC

A connection to a USB Test and Measurement Class (USBTMC) port, realized via pyvisa and ni-visa runtime.

Troubleshooting

Problem: Port cannot be found

  • Is the device connected and switched on?
  • Do you use the correct USB port of the equipment?
  • Do you have installed the ni-visa runtime?
  • Do you see your device as USBTMC device in the Windows device manager?
  • Are you sure it is a device creating a USBTMC port? Many devices have a physical USB port which creates a COM port.


TCPIP

A TCPIP connection via pyvisa, e.g. to connect measurement instruments via ethernet.

Troubleshooting

not available

VB

A National Instruments VirtualBench device.


MIDI

Under consideration. In future, MIDI ports could automatically be found. Please contact us if this would be interesting to you.

CAN bus

CAN bus is not yet implemented. Further information can be found here: https://en.wikipedia.org/wiki/CAN_bus

If you like to communicate via CAN bus, we recommed to create a Device Class by implementing your own port object using the library python-can (https://python-can.readthedocs.io/en/master/).