Grouping bytes to fix bit overlap?
I am new to setting up parameters and bit offsetting - I am wondering how I can group bytes together. I have a GFOUT that is 8 bytes in data length. I have to send a values to byte 1 and 2. One value I have to send to byte 1 is 500 dec which requires 2 bytes or 9 bits. If I change it to either or, there is an overlap.
Customer support service by UserEcho
what the diagram is showing is that you have allocated all 8 bytes in full. That is shown as every bit in the full 8 bytes being yellow. The red bit at bit 8 is showing that bit 8 of the first parameter out (or in depending on what this is) is allocated twice also as bit 0 of the second parameter You can move the starting position of the second parameter to be bit 9 and that will fix the issue with parameter 1 but cause the same issue to occur with parameter 2.
ultimately i think youll need to move your last parameter to a new frame out or in. This will (assuming all the rest of your parameters are on byte boundarys) turn bits 57 through 63 grey (unallocated) and all will be well with your project...
an alternate approach you can consider... do all the 500 values that you want your first parameter to represent mean something thats actually important for your use case? Or is it actually important to be able to differentiate 499 from 500? Aometimes the answer is obviously yes, othertimes not so much. For example if each least significant bit represents a voltage change of 0.00476v for example then if you drop the lsb and therefor make the new lsb represent double what it was before then would that actually be an issue? In which case you go back to using just a byte to transfer and double the integer value with a math channel when you recieve it....
Im assuming your sending from iqan to iqan because if your not, and your sending to another canbus device then the parameter layout that the graph is showing will have been defined by the OEM of that device and all you have to do here is make the inetrnal iqan frame align to that OEM definition and make the channels.feeding or using the parameters provide the data exactly as the device expects.