Hi Claes,
I'm currently writing a new communication driver and am encoutering an issue I've never faced before.
Indeed, my issue is between the Proview signal Ii / ChanIi and the driver input area zone.
My communication tests look fine and I can retreive correctly the data from my external PLC into the local->input_area which is declared as
unsigned char *input_area;
in the local card structure.
All the input area is good matching in term of values and size
My problem come when I call the:
io_bus_card_read(ctx, rp, cp, local->input_area, NULL, local->byte_ordering, local->float_representation);
function in my cyclic IoCardRead function.
What happen is that the two first byte (correspond to the first Ii signal (UInt16)) are not transferred to the related Ii signal whereas all the other signals (I tested with 9 signal from 1 to 9 and signals 2 -> 9 are fine). There is no shift at all and the second signal corresponds correctly to value 2 and so on.
I thought about a pointer issue that could erase or rewrite this data area but writing into the Ii signal by hand though rt_rtt reveals that this values is not overwritten by anything (it keeps the values I set by hand at every change).
Note: The ConversionOn is correctly set to 1 in the ChanIi and I reconnection twice the Ii to the ChanIi to be 100% sure.
Would you have any idea what could prevent this first data of being transferred ? Would you have any idea how to troublesoot this ?
Thanks a lot in advance
Snarf