Page 1 of 1

Modbus RTU

Posted: Sun Jul 03, 2011 6:20 pm
by Ron
Hi,

I am trying to implement Modbus RTU and I need to work on the CRC routine. I did a simple test to see the difference between a CALC block and a "C" block.

The project compiles but when I run a simulation the VARS I created and are incrementing in the "C" block are not counting up.

What am I doing wrong? Here is the code in the "C" block.


FCV_VAR_BYTE_2 = FCV_VAR_BYTE_2 + 1;

FCV_VAR_INT_2 = FCV_VAR_INT_2 + 1;

Thanks,

Ron

Re: Modbus RTU

Posted: Sun Jul 03, 2011 7:09 pm
by Spanish_dude
C code blocks aren't executed in the simulation.
On real hardware it should work fine ;).