You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val request = ReadCoilsRequest()
request.serverAddress = 1
request.startAddress = 0
request.transactionId = 0
request.quantity = 123
val response = m.processRequest(request) as ReadCoilsResponse
When trying to get the value of an individual coil, it gives an exception java.lang.ArrayIndexOutOfBoundsException when accessing a specific coil index
println("test: ${response.modbusCoils.get(120)}")
As a workaround I am using the coils property (which is indicated to be deprecated)
println("test: ${response.coils.get(120)}")
The text was updated successfully, but these errors were encountered:
When performing a read of coils
When trying to get the value of an individual coil, it gives an exception java.lang.ArrayIndexOutOfBoundsException when accessing a specific coil index
println("test: ${response.modbusCoils.get(120)}")
As a workaround I am using the coils property (which is indicated to be deprecated)
println("test: ${response.coils.get(120)}")
The text was updated successfully, but these errors were encountered: