8 bits in one can message

Kristof
2017-07-18
2017-07-19
  • Kristof - 2017-07-18

    Hi. I saw somewhere (but I don't remember where) how send 8 bits in one CAN message. I was something like this:

    au8_Rx_Data[0]:=UINT_TO_BOOL(t_CanMsg_Rx.au8_Data[0.1];
    au8_Rx_Data[1]:=UINT_TO_BOOL(t_CanMsg_Rx.au8_Data[0.2];
    au8_Rx_Data[2]:=UINT_TO_BOOL(t_CanMsg_Rx.au8_Data[0.2];Β  Β 
    //ETCΒ  Β 
    

    Added a dot and a new numeric field.
    But that is not exactly it. If anyone can tell me more,
    Thanks

     

    Related

    Talk.ru: 1
    Talk.ru: 2

  • Lo5tNet - 2017-07-18

    Think you might be talking about something like:

    tx_Data.0 := bit1;
    tx_Data.1 := bit2;
    tx_Data.2 := bit3;
    
     
  • josepmariarams - 2017-07-18

    Hi.

    Could be?:
    T_canmsg_rx.aux8_data[0].1

    Or if not, traditional system:

    Data[0]&16#00010

     
  • Kristof - 2017-07-19
    T_canmsg_rx.aux8_data[0].1
    

    That's it.
    Thanks.

     

Log in to post a comment.