If no device is found when you scan the network before logging in to Codesys v3.x, you might have missed a step in the configuration, or changed something which has caused a communication issue. This is an issue that has many possible causes.
- Is the red LED lit on the CAN-dongle? Does it blink when you scan the network?
- If the LED is not lit at all, then you might have a CAN driver issue and should try either reinstalling the drivers, updating them from the Peak website, or try a different USB port.
- If the LED is on, but does not blink when you scan the network, you have a miscommunication between the gateway and the CAN dongle.
- At this point, make sure that the CAN network configured in the stwpeak2.ini file (default is TestNet) in the codesys gateway directory actually exists. Use the PCAN Nets Configuration program to create it if it does not.
- Check that the settings in the [CmpStwBlkDrvCanClient] section of the gateway.cfg file matches the communication settings for the controller in the Codesys project (NodeID, BaseID.... etc).
- Have you configured the Gateway correctly (as described in the user-manual)?
- If logging in via CAN, did you copy the contents of the CAN gateway template file to the gateway.cfg file?
- Is the baudrate set correctly in the gateway.cfg file?
- If you modified the gateway.cfg file, did you stop and restart the gateway process in the Windows system tray? This is necessary for the gateway to register the changes.
- Do you have full administrative rights on the PC?
- If not, the PC might be blocking access to necessary gateway related files.
- Do other STW-tools (e.g. Winflash) work fine using the CAN-dongle system (e.g. PEAK-USB-dongle) and the same CAN-dongle-network (e.g. TestNet)?
- Do you have the problem on the CAN-bus, RS232 or both?
- If you are having issues logging in via CAN, you could try setting up the project and the gateway to login via RS232. If that succeeds, then you know the issue is most likely related to CAN settings for the gateway or networks, and not a deeper issue with the gateway itself.
- Do you have the problem when the LAN-network is disconnected from your PC (=network cable), and wifi is disabled?
- The gateway uses the network interface in your PC to communicate with the CAN hardware, and the gateway can experience communication issues in some cases.
- Have you installed all drivers of the CAN-bus dongle?
- Do you have the problem also using another USB-port?
- Do you have the problem also using a different CAN-USB-dongle?
- Do you have the problem also using a STW-template project?
- Was the Codesys gateway service actually started by the operating system?
- Do you can see any CAN-message on the CAN-monitor when clicking on the Scan button in CODESYSV3.x?
- Do you have still the problem when deactivating the firewall?
- Do you have a 100% stable working CAN-bus sytem (Status=Ok), means the CAN-bus is physically working and termination resistors are mounted, no distributions on the CAN-bus,…etc?
- Are any other devices connected to the CAN bus which may be running at a different bitrate?
- Do you have the problem only on one PC or on different PCs?
- Does any CAN-network exist, e.g. TestNet?