I have been able to get a T7 to send data to an I2C bus using lua scripting via Kipling 3.1.17's Lua Scipt Debugger. However, I want to be able to do this via the T7's Modbus registers similar to, I think, what is discussed here.
The end goal is to have a PLC, over modbus, configure the T7's I2C settings and command the T7 to write/read to/from a remote I/O expander chip like a PCF8574.
Intermediately, I am trying to use the Register Matrix area in Kipling to directly write to those same modbus registers to imitate what I think I should be able to do from a PLC.
The problem I am having, is that I cannot get Kipling to allow me to change the I2C_DATA_TX register. Every time I try, I get the following error:
1. LJME Function Does Not Support This Type (1312)
- LJM Error Name: LJME_FUNCTION_DOES_NOT_SUPPORT_THIS_TYPE
- Description: The function does not support the given data type. For example, LJM_eReadName and LJM_eReadAddress do not support reading LJM_STRING values, which are too large.
- Operation: write
- Arguments: address: "I2C_DATA_TX", value: null
Here is what some of the other I2C registers hold now:
I2C_SDA_DIONUM = 13
I2C_SCL_DIONUM = 12
I2C_SPEED_THROTTLE = 0
I2C_OPTIONS = 0
I2C_SLAVE_ADDRESS =32
I2C_NUM_BYTES_TX = 1
I2C_NUM_BYTES_RX = 0
Any help would be greatly appreciated.
Update:
I was able to speak with LJ support through the chat feature and learned that Kipling does not support writing to an array register which is why I was getting that particular error.
If I am able to complete my real task of initiating I2C transactions via a PLC over modbus, I will report back here for any interested.