![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||
|
Hello! I developed a Beckhoff ADS IOC application using this ADS driver (https://github.com/Beckhoff/ADS). After the IOC runs for some time, the following issue occurs: "WARNING dbEvent possible queue stall". Concurrently, the PVs in the OPI will disconnect and then automatically reconnect after a short period. Here's a code snippet for reading data from the PLC using the ADS driver: extern "C" { struct WaterStatusStruct adsReadWaterStatusValue(){ WaterStatusStruct CWStatusVar; const std::string handleName = "GVL_RFQ.water_status"; //Use mutex locks to protect access std::lock_guard<std::mutex> lock(plcMutex); const long handleStatus = AdsSyncReadWriteReqEx2(port, &plcAddress, ADSIGRP_SYM_HNDBYNAME, 0, sizeof(handle), &handle, handleName.size(), handleName.c_str(), nullptr); if (handleStatus) { printf("adsReadWaterStatusValue Create handle failed with: %8lX\n", handleStatus); //out << "Create handle for '" << handleName << "' failed with: 0x" << std::hex << handleStatus << '\n'; return CWStatusVar; } const long status2 = AdsSyncReadReqEx2(port, &plcAddress, ADSIGRP_SYM_VALBYHND, handle, sizeof(CWStatusVar), &CWStatusVar, &bytesRead); if (status2) { printf("adsReadWaterStatusValue ADS read failed with: %8lX\n", status2); //out << "ADS read failed with: " << std::dec << status << '\n'; } const long releaseHandle = AdsSyncWriteReqEx(port, &plcAddress, ADSIGRP_SYM_RELEASEHND, 0, sizeof(handle), &handle); if (releaseHandle) { //out << "Release handle 0x" << std::hex << handle << "' failed with: 0x" << releaseHandle << '\n'; printf("adsReadWaterStatusValue Release handle failed\n"); } return CWStatusVar; } } What can I do to fix this?Thank you for your time.
| ||||||||||||||
ANJ, 06 Jun 2025 |
![]() · Download · Search · IRMIS · Talk · Documents · Links · Licensing · |