C2000 Modbus RTU Slave
Hi,
I’m programming a DSP TMS320F28069M using Simulink. I have successfully received data and unpack that receive data via uint16 format. And I use a matlab function block. This reason that I used, to compare the required bits for Modbus communication. Although byte unpack block output type is uint16, I couldn’t use this receive value. For example, let the SCI received data be ’01 02 00 00 00 00 02 10′. First of compare the first byte. If first byte is 01, transmits the eighth byte. But if not sends second byte. I always saw the second byte was gone. I guess received or compare data type is wrong but I couldn’t find it. I changed the value C1 instead of 01 in the if loop. When I enter the C1 byte into the system, an error occurs How can I do this?
Inside the function block:Hi,
I’m programming a DSP TMS320F28069M using Simulink. I have successfully received data and unpack that receive data via uint16 format. And I use a matlab function block. This reason that I used, to compare the required bits for Modbus communication. Although byte unpack block output type is uint16, I couldn’t use this receive value. For example, let the SCI received data be ’01 02 00 00 00 00 02 10′. First of compare the first byte. If first byte is 01, transmits the eighth byte. But if not sends second byte. I always saw the second byte was gone. I guess received or compare data type is wrong but I couldn’t find it. I changed the value C1 instead of 01 in the if loop. When I enter the C1 byte into the system, an error occurs How can I do this?
Inside the function block: Hi,
I’m programming a DSP TMS320F28069M using Simulink. I have successfully received data and unpack that receive data via uint16 format. And I use a matlab function block. This reason that I used, to compare the required bits for Modbus communication. Although byte unpack block output type is uint16, I couldn’t use this receive value. For example, let the SCI received data be ’01 02 00 00 00 00 02 10′. First of compare the first byte. If first byte is 01, transmits the eighth byte. But if not sends second byte. I always saw the second byte was gone. I guess received or compare data type is wrong but I couldn’t find it. I changed the value C1 instead of 01 in the if loop. When I enter the C1 byte into the system, an error occurs How can I do this?
Inside the function block: modbus, sci MATLAB Answers — New Questions