Sending CAN messages with different timing in the same script
Posted: Mon 21. Oct 2024, 10:58
Hello everyone,
I need help understanding how to write this script in PCAN-Explorer 6:
Basically I need to send two different CAN messages, one for communicate with a board every 250ms and one to pilot a load every 4 seconds.
Something like this:
for x times:
Message 1
ID 1
(data)
wait 250
Message 2
ID 2
(data)
wait 4000
These two messages need to be sent in the same macro, in "parallel".
I'm new in writing macros so I was thinking on how to do it without getting stuck in the "wait" statement of the one that last 4s.
Any ideas? Can I create two different sub in the same macro and then a third that call the two with their specific timing?
I hope my request is clear,
I'm available for more information,
thank you in advance for your response.
I need help understanding how to write this script in PCAN-Explorer 6:
Basically I need to send two different CAN messages, one for communicate with a board every 250ms and one to pilot a load every 4 seconds.
Something like this:
for x times:
Message 1
ID 1
(data)
wait 250
Message 2
ID 2
(data)
wait 4000
These two messages need to be sent in the same macro, in "parallel".
I'm new in writing macros so I was thinking on how to do it without getting stuck in the "wait" statement of the one that last 4s.
Any ideas? Can I create two different sub in the same macro and then a third that call the two with their specific timing?
I hope my request is clear,
I'm available for more information,
thank you in advance for your response.