|
|
Experimental Physics and
| ||||||||||||||
|
|
The firewall seems to be the culprit, but I added rules for the application. I also just done a test where I disabled the firewall and I get the same result. D:\FalconDev\EPICS\modbus\iocBoot\iocTest>..\..\bin\windows-x64-mingw\modbusApp.exe BPS_Beck.cmd # BPS_Beck.cmd # Just testing the modbus module with my BPS Beckhoff PLC. # 1. Cleanly lock network routing automatically at boot epicsEnvSet("EPICS_CA_ADDR_LIST", "10.136.0.255") epicsEnvSet("EPICS_CA_AUTO_ADDR_LIST", "NO") epicsEnvSet("EPICS_CAS_INTF_ADDR_LIST", "10.136.0.34") # gvl.mb_Input_Registers[10] := GVL.d_setpoint_T1; // T1 mS # gvl.mb_Input_Registers[11] := GVL.d_setpoint_TRamp1; // Ramp1 uS # gvl.mb_Input_Registers[12] := GVL.d_setpoint_v1; // V1 10V # gvl.mb_Input_Registers[13] := GVL.d_setpoint_T2; // T2 mS # gvl.mb_Input_Registers[14] := GVL.d_setpoint_TRamp2; // Ramp2 uS # gvl.mb_Input_Registers[15] := GVL.d_setpoint_V2; // V2 10V # gvl.mb_Input_Registers[16] := GVL.d_setpoint_T3; // T3 mS # gvl.mb_Input_Registers[17] := GVL.d_setpoint_TRamp3; // Ramp3 uS # gvl.mb_Input_Registers[18] := GVL.d_setpoint_V3; // V3 10V # gvl.mb_Input_Registers[19] := GVL.d_setpoint_pulseLength; // PulseLength S /mS # gvl.mb_Input_Registers[20] := GVL.d_setpoint_TRampDown; // RampDown uS dbLoadDatabase("../../dbd/modbusApp.dbd") modbusApp_registerRecordDeviceDriver(pdbbase) # Get the connection going drvAsynIPPortConfigure("BPS_Beck", "10.136.0.30:502", 0, 0, 0) 2026/07/24 09:32:59.953 BPS_Beck -1 autoConnect could not connect: Can't connect to 10.136.0.30:502: Unknown error # drvAsynIPPortConfigure("BPS_Beck", "8.8.8.8:8080", 0, 0, 0) modbusInterposeConfig("BPS_Beck", 0, 5000, 0) asynSetOption("BPS_Beck",0, "disconnectOnReadTimeout", "Y") # ========================================================================= # Configure Modbus Drivers Memory Blocks # ========================================================================= # Syntax: # drvModbusAsynConfigure("portName", "tcpPortName", slaveAddress, modbusFunction, modbusStartAddress, modbusLength, dataType, pollMsec, "plcType") # drvModbusAsynConfigure("modbusPortName", "asynPortName", slaveAddress, modbusFunction, startAddress, length, dataType, pollMsec, "plcType") # Read Coils (Function Code 1) # Reads 16 binary bits starting at offset 0, polling every 200 milliseconds. # drvModbusAsynConfigure("READ_COILS", "PLC_NET", 0, 1, 0, 1, 0, 200, "OldPLC") # Write Coils (Function Code 5) # Configures a write-only path for coils. pollMsec is 0 because writes are instantaneous. # drvModbusAsynConfigure("WRITE_COILS", "PLC_NET", 0, 5, 0, 1, 0, 0, "OldPLC") # Reads 11 read-only 16-bit registers starting at offset 10, polling every 500 milliseconds. # dataType=0 specifies standard 16-bit unsigned integers (UINT_16). drvModbusAsynConfigure("READ_INPUTS", "BPS_Beck", 1, 4, 10, 11, 0, 500, "Beckhoff") # Read Holding Registers (Function Code 3) # Reads 1 read/write 16-bit register starting at offset 0, polling every 500 milliseconds. # dataType=0 specifies standard 16-bit unsigned integers (UINT_16). # drvModbusAsynConfigure("READ_HOLDING", "PLC_NET", 0, 3, 0, 1, 0, 500, "OldPLC") # Block E: Write Holding Registers (Function Code 6) # Configures a write-only path for single registers. pollMsec is 0 for on-demand writing. # drvModbusAsynConfigure("WRITE_HOLDING", "PLC_NET", 0, 6, 0, 1, 0, 0, "OldPLC") # Enable ASYN_TRACEIO_HEX on octet server # asynSetTraceIOMask("BPS_Beck",0,4) # Enable ASYN_TRACE_ERROR and ASYN_TRACEIO_DRIVER on octet server # asynSetTraceMask("BPS_Beck",0,9) dbLoadRecords("../../db/BPS_Beck.db") iocInit Starting iocInit ############################################################################ ## EPICS R7.0.10 ## Rev. 2026-07-01T08:47+0200 ## Rev. Date build date/time: ############################################################################ 2026/07/24 09:33:00.992 drvModbusAsyn::doModbusIO port READ_INPUTS error calling writeRead, error=asynManager::queueLockPort queueRequest failed: port BPS_Beck not connected, nwrite=0/6, nread=0 iocRun: All initialization complete epics> Kind Regards Luis On 23/07/2026 16:24, Gabriel Fedel
wrote:
-- Luis Moreira EPFL SB SPC-II, PPH241 (Batiment PPH) Station 13 CH-1015 Lausanne, Switzerland Tel. (+41) 21 693 58 37 E-Mail luis.moreira at epfl.ch
| ||||||||||||||
| ANJ, 24 Jul 2026 |
·
Home
·
News
·
About
·
Talk
·
Base
·
Modules
·
Extensions
·
· Distributions · Download · Documents · Links · Licensing · |