This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28379D: SIMULIN CAN RX

Part Number: LAUNCHXL-F28379D

Dear All,

I am using Simulink to build a model to receive CAN messages. You can see diagram below. I am getting "error: expression must have struct or union type" error.  Please help me. How can I solve that?

Thanks

"ykarata1_BMS_C2000_RX_deneme.c", line 67: error: expression must have struct or union type
"ykarata1_BMS_C2000_RX_deneme.c", line 68: error: expression must have struct or union type
"ykarata1_BMS_C2000_RX_deneme.c", line 70: error: expression must have struct or union type
"ykarata1_BMS_C2000_RX_deneme.c", line 71: error: expression must have struct or union type
"ykarata1_BMS_C2000_RX_deneme.c", line 73: error: expression must have struct or union type




   /* S-Function (scanunpack): '<S1>/CAN Unpack' */
65	    {
66	      /* S-Function (scanunpack): '<S1>/CAN Unpack' */
67	      if ((1 == ykarata1_BMS_C2000_RX_deneme_B.eCANReceive_o2[0].Length) &&
68	          (ykarata1_BMS_C2000_RX_deneme_B.eCANReceive_o2[0].ID != INVALID_CAN_ID)
69	          ) {
70	        if ((4 == ykarata1_BMS_C2000_RX_deneme_B.eCANReceive_o2[0].ID) && (0U ==
71	             ykarata1_BMS_C2000_RX_deneme_B.eCANReceive_o2[0].Extended) ) {
72	          (void) memcpy(&ykarata1_BMS_C2000_RX_deneme_B.CANUnpack,
73	                        ykarata1_BMS_C2000_RX_deneme_B.eCANReceive_o2[0].Data,
74	                        1 * sizeof(uint8_T));
75	        }
76	      }
77	    }