Correct dip-switch settings for Neuron and extensions
-
Hi,
I have one L513 and 2 xS40s. They are having a lot of issues communicating, and often needs to be rebooted. I've been trying to read through the documentation, but can not find a straight forward explanation as to how to connect them all. The extensions have modbus address 2 and 12, 19.2/N on both. One of the xS40s have the the end bit set. On the L513 I use the first 485 port and have set the end bit on that one too. Does this sound correct? Is there anything else I should be aware off? Which modbus address does the L513 get?
Thanks,
Andreas -
Hello @alydersen,
the way you describe it seems that you have done everything correctly. What sort of issues do you experience? What software do you use? How does the RX/TX leds look like when the issue occurs?The L513 act as a master of the ModbusRTU communication, therefor it doesn't have any address.
Best regards,
Martin -
Hello @Martin-Kudláček
The issue that I'm experiencing is that the communication between the units are unstable. The lights are blinking asynchronically and there seems to be no logic in it. Sometimes things works stable for a little while, then stops working again. I'm using EVOK which I'm mainly talking ws with from a Node-RED.
I've made a short video that you can watch here https://www.dropbox.com/s/9fg3tknug736xja/IMG_1966.m4v?dl=0
BR,
Andreas -
Hi @alydersen,
Could you please post your Evok configuration file? The dip switch positions appear at least superficially correct, so there may be something else going wrong.
Kind Regards
-
This post is deleted! -
Hi @TomasKnot .
Here's the evok.conf:
#!!! Do not use '#' for comments !!! [MAIN] ; !!! ALL MAIN SECTION OPTIONS ARE MANDATORY !!! config_version = 2.5 ; Configuration file version, DO NOT CHANGE! use_schema_verification = False ; Enabling this will deny any requests that do not match the JSON Schema; NOTE THAT THIS RESULTS IN A SIGNIFICANT INCREASE IN LATENCY AND SHOULD NOT BE USED EXCEPT F OR TESTING log_level = ERROR ; Minimum severity of messages to be logged; one of INFO, DEBUG, WARNING, ERROR, CRITICAL log_file = /var/log/evok.log ; Log file to use; will be cleared on boot port = 8080 ; !!! Internal API port - only change if you are certain you know what you are doing; FOR OUR WEB INTERFACE THE PORT SHOULD BE CHANGED IN "/e tc/evok-nginx.conf" INSTEAD !!! webhook_enabled = False ; Enables webhook notification - see e.g. https://sendgrid.com/blog/whats-webhook/ webhook_address = http://127.0.0.1:80 ; Put your server endpoint address here (e.g. http://123.123.123.123:/wh ) webhook_device_mask = ["input","wd"] ; List of device types to notify on (written as a JSON list) - adding AI will generate a large amount of messages! webhook_complex_events = False ; EVOK will send POST requests with the same data as WebSocket, rather than an empty GET request wifi_control_enabled = False ; !!! REQUIRES THE UNIPIAP WIFI CONTROLLER TO BE INSTALLED !!! Will allow evok to control the internal Neuron wifi soap_server_enabled = False ; Enables the simple SOAP server; use only if you need the functionality soap_server_port = 8081 ; !!! IF SOAP SERVER IS ENABLED, THIS PORT NEEDS TO BE UNIQUE (i.e. different from the port setting above) !!! [NEURON_1] global_id = 1 ; Mandatory, REQUIRED TO BE UNIQUE allow_register_access = True scan_frequency = 10 ; Optional, 10 default, scanning frequency in [Hz] scan_enabled = True ; Below you can find examples for connecting devices over UART; first example is a Neuron extension while the second is a custom third-party device ; Devices sharing a port use the port settings of the first device on that port (baud rate, parity, stop bits) ; !!! Note that device_name has to match a filename in the /etc/hw_definitions directory !!! See /etc/hw_definitions/CUSTOM MODBUS DEVICE.yaml for an example [EXTENSION_1] global_id = 2 ; Mandatory, REQUIRED TO BE UNIQUE device_name = xS40 ; Mandatory modbus_uart_port = /dev/extcomm/0/0 ; Mandatory ;neuron_uart_circuit = 1_01 ; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus UART ports, e.g. /dev/ttyUSB0 or / dev/ttyS0) ;allow_register_access = True ; Optional, False default, is mandatory with third-party devices address = 2 ; Optional, 1 default ;scan_frequency = 10 ; Optional, 10 default, scanning frequency in [Hz] ;scan_enabled = True ; Optional, True default ; Note that the following settings will be inherited by other devices sharing the same port, i.e. /dev/extcomm/0/0 baud_rate = 19200 ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN parity = N ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN stop_bits = 1 ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN [EXTENSION_2] global_id = 3 ; Mandatory, REQUIRED TO BE UNIQUE device_name = xS40 ; Mandatory modbus_uart_port = /dev/extcomm/0/0 ; Mandatory ;neuron_uart_circuit = 1_01 ; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus UART ports, e.g. /dev/ttyUSB0 or /dev/ttyS0) ;allow_register_access = True ; Mandatory with third-party devices address = 12 ; Optional, 15 default ;scan_frequency = 2 ; Optional, 1 default, scanning frequency in [Hz] ;scan_enabled = True ; Optional, True default [OWBUS_1] owbus = /dev/i2c-1 --i2c=/dev/i2c-1:ALL ; Mandatory, scanned bus (--i2c=/dev/i2c-1:ALL or localhost:2122 or 'u' for USB dongle) interval = 3 ; Mandatory, [s] length of sensor reading scan_interval = 300 ; Mandatory, [s] How often the scanning is done ; See below for 1Wire extension module configuration ; Example for the 1W-4R/4DI extension module, 1W-8R is almost the same, only with inputs instead of relays ; ; - Map a new 1Wire sensor with the appropriate address, type and interval ; - The syntax can be either SENSOR or 1WDEVICE ; - Setting the correct reading interval is crucial to achieve ideal performance; the default interval is 15s ; ;[1WDEVICE_2] ;bus = 1 ;address = 29F39A17000000BC ;type = DS2408 ;interval = 1 ; ;[1WRELAY_10] ;sensor = 2 ;pin = 0 ; ;[1WRELAY_11] ;sensor = 2 ;pin = 1 ; ;[1WRELAY_12] ;sensor = 2 ;pin = 2 ; ;[1WRELAY_13] ;sensor = 2 ;pin = 3 ; ;[1WINPUT_20] ;sensor = 2 ;pin = 4 ; ;[1WINPUT_21] ;sensor = 2 ;pin = 5 ; ;[1WINPUT_22] ;sensor = 2 ;pin = 6 ; ;[1WINPUT_23] ;sensor = 2 ;pin = 7
Andreas
-
-
More info:
root@L513-sn24:/home/pi# systemctl status unipitcp ● unipitcp.service - Unipi Neuron/Axon Modbus/Tcp Server Loaded: loaded (/lib/systemd/system/unipitcp.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2018-12-04 08:37:49 UTC; 4h 38min ago Process: 847 ExecStartPre=/bin/sh -c if [ "${FIRMWARE_UPDATE}" = "1" ]; then /opt/unipi-bin/fwspi --auto; fi (code=exited, status=0/SUCCESS) Main PID: 874 (unipi_tcp_serve) CGroup: /system.slice/unipitcp.service └─874 /opt/unipi-bin/unipi_tcp_server -p 502 Dec 04 08:37:49 raspberrypi systemd[1]: Starting Unipi Neuron/Axon Modbus/Tcp Server... Dec 04 08:37:49 L513-sn24 systemd[1]: Started Unipi Neuron/Axon Modbus/Tcp Server.
root@L513-sn24:/home/pi# /opt/unipi-bin/fwspi -i 0 Boardset: 0 B-1000 (v1.0) Baseboard: 0 B-1000 (v1.0) Firmware: v5.31 root@L513-sn24:/home/pi# /opt/unipi-bin/fwspi -i 1 Boardset: 15 E-4Ai4Ao_U-6Di5Ro (v1.0) Baseboard: 11 E-4Ai4Ao (v1.0) Firmware: v5.31 root@L513-sn24:/home/pi# /opt/unipi-bin/fwspi -i 2 Boardset: 15 E-4Ai4Ao_U-6Di5Ro (v1.0) Baseboard: 11 E-4Ai4Ao (v1.0)
-
@TomasKnot or @Martin-Kudláček:
Is there anything that can be done with this? It is a real problem for us and are holding back production.
Andreas
-
Hi @alydersen,
it is hard to tell what's wrong without the access to the setup. Would it be possible to arrange SSH access to the PLC? We can go over the details via email: [email protected]Best regards,
Martin