MAIC V2 CAN solution

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
SAutoMotive
Posts: 5
Joined: Thu Jul 31, 2014 2:21 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

MAIC V2 CAN solution

Post by SAutoMotive »

Good afternoon,

Since a few months I am using Flowcode and at the moment Version 6 in combination with a MIAC V2.
About the MAIC and the CAN fuctionality I have a question.

- To control an engine I have to send every 10 ms a CAN message.
This is not a problem, the MAIC is doing this perfect. I send a direction and a throttle signal in this message.
Throttle is an analog input, the direction a switch.

Is it possible to make a fixed CAN message every 10 ms, and doing something else with the MAIC / with the PIC 18F4455.
Now I make a simple flowchart, but every 10 ms there has to be a "sendbuffer".

When I check other incoming CAN messages or something this take to much time to send te next CAN message at the correct time.
The timing will go up to 15 to 20 ms and than the engine will give a error.
Is there a solution for this?

And an other question:
- Are there plans to make a new model MIAC, maybe with for example 16-bit PIC or two CAN lines?

Thanks in advance!

Kind regards,

Alwin

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: MAIC V2 CAN solution

Post by LeighM »

Hi,
As a quick reply, I would suggest creating a 10mS interrupt which sets a flag
Then in your main program loop, check the flag, send the buffer and clear the flag
This means your main loop has to be tight, so avoid delays
Any other processing that takes time or needs delays will have to be invoked on a similar tick count approach
Hope that helps
A higher specified MIAC is in the pipeline, but some months away
Regards,

SAutoMotive
Posts: 5
Joined: Thu Jul 31, 2014 2:21 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: MAIC V2 CAN solution

Post by SAutoMotive »

Thanks for your reply!

I am going to test this advise in my software!
Can you give me already some specs of the new MIAC or the targets/marks that the new MIAC meets?

Kind regards,

Alwin

Post Reply