If i try this i get “Expression missing” error.
I have almost 10 to 15 data like this which i need to send to a CAN device and sending it as a single payload would make my life easier.
Do anyone have any ideas`? Or in simpler words: If i want to send a set of commands via SDO 60?h like 40 18 10 00 00 00 00 00, then 40 18 10 01 00 00 00 00, 40 18 10 00 00 00 00 00 then 23 01 10 00 00 00 00 00 one after the other , how can i implement it?
Are these hardcoded frames, or do you expect the data to change?
If it’s hardcoded, then Tommi’s suggestion is a good one. You could also initialize the frame data in the variable declaration if want to clean up your main program file.
The way I’ve packed ArCan frames in the past is by creating custom functions. For example, I’ll have a function called CreateXyzFrame() with the inputs being the data that’s included in that frame. Then the function can organize/modify/pack the frame, with the output being an ArCanFrameType.