Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

ModbusSlave - Variable Out of Bounds


humpty Nov 24, 2017 12:41 PM

Hi all!

I am using a CR3000 with OS31.03 and experience a problem.
I can see this warning in the logger:  Variable Out of bounds : 1060
Normally i know exactly what to look after to fix this kind of error, but right now i am a bit clueless.

Following the exact code-snippet is the code-snippet (mb_bool is the last variable declared before entering the program block).
Dim mb_bool As Boolean
BeginProg
    ModbusSlave (502, 115200, 1, val, mb_bool, 0)
...

mb_bool is nowhere else used in the program.
My question:
Is it possible the VOOB-error gets triggered from the external modbus-request?
e.g. by functioncode 15 (write/force multiple coils)?

thanks


nsw Nov 30, 2017 04:42 PM

Could be the Master Modbus trying to set "coils" on the logger. As these are only boolean, try making the variable an array to test this out:-

Dim mb_bool(50) As Boolean

Just in case, set the variable "val" to an array as well, in case the Master is trying to set something on it..

Log in or register to post/reply in the forum.