I'm posting this message because I need to make a modbus tcp communication with a ctrlX core PLC. I saw that on the store, there is an app "CTRLX CORE Modbus tcp", is it necessary to download it to communicate with a modbus tcp module?
Then I read that the XF50 port is reserved for EtherCat. So I guess the app allows to configure the XF51 port to communicate?
Thanks in advance for your answer,
Solved! Go to Solution.
I have succeeded in communicating with my modbus module (the IL_ModbusTCPclient module and the IL_modbusTCPRead device Identification module are working), but I can't read the information in the registers (float 32) of the Schneider module.
I don't know what the differences are between the ModbusTCPReadCoils, ModbusTCPReadHoldingRegister and ModbusTCPReadinputRegister blocks.
In my case, I created a real array to store the data with a word pointer to it.
But it gives me as error :
Resource_error for the ModbusTCPReadinputRegister block which means an error "Input 'ModBusLink' is invalid".
Communication_error for the IL_ModbusTCPclient block which means "the socket is not connected or Remote station closed Connection".
I admit that if you have an idea, I would be delighted.
Thanks in advance for your answer,
Translated with www.DeepL.com/Translator (free version)
The "CoilData" input maps the coils defined in Modbus. Coils form a bit field with a maximum length of 65536 bits. The bits can be read as well as written. The data exchange takes place via the array created at the "CoilData" input. Each byte of the array represents 8 bits.
The size of the array in bytes must be created at the "SizeOfCoilData" input. The SIZEOF() operator can be used for this. The function block uses "SizeOfCoilData" to check whether incoming requests are within the created field.
The "InputData" input maps the discrete inputs defined in Modbus. Discrete inputs form a bit field with a maximum length of 65536 bits. The bits can only be read. Data exchange takes place via the array created at the "InputData" input. Each byte of the array represents 8 bits.
The size of the array in bytes must be created at the "SizeOfInputData" input. The SIZEOF() operator can be used for this. The function block uses "SizeOfInputData" to check whether incoming requests are within the created array.
The input "HoldingRegisterData" maps the holding registers defined in Modbus. The registers form a field of words (16 bit values) with a maximum length of 65536 words. The registers can be read as well as written. Data exchange takes place via the array created at the "HoldingRegisterData" input.
The size of the array in bytes must be created at the "SizeOfHoldingRegisterData" input. The SIZEOF() operator can be used for this. The function block uses "SizeOfHoldingRegisterData" to check whether incoming requests are within the created array.
However, the actual error is due to the non-existent connection. The connect reports an error. To do this, you would need to know the detailed information of the error message of the client module. ErrorID and ErrorIdent!
Hello, despite the information, it does not work. Either with the module "ModbusTCPReadInputRegisters or ModbusTCPReadHoldingRegisters". The error is "resource_error" and the code "additionnal 1 = 16#0A0F1850" and the code "additionnal 2 = 16#0c230003". Unfortunately, these error codes are not found in the documentation.
If you have any information, thank you in advance for your reply,
Hello, the error code for the client tcp module is :
add1: 16#0A0F0111 and add2: 16#0C23020E. In the documentation, this means that the connection has been closed.
The problem is that when I use the module to retrieve the module constructor information with the client tcp module, I get it.
The variables are of type "float 32", my question is: should I use an array of type "word" with its "pointer to word"?
I confess that I do not understand. I put additional screenshots.
Thank you in advance for your answer
first of all something about the programme. Setting the enable signal on the ReadInputRegister module to TRUE only makes sense if the client module also supplies an InOperation. The InOperation output can be the input for the Read module, for example. And as long as the client always reports an error, we don't need to look for errors in the read component.
If a 32-bit value is to be read, an array of words with at least 2 elements must be specified as the target. This is also described in the interface description in the documentation.
So I would first do the following: