Hello,
I need to be able to compute a value (rolling count) and assign it to a signal before every transmission of a particular message. The message is being transmitted every 25ms. I can only think of two ways of doing this: firing a script based on an event (I couldn't find an event that would accomplish this), or setting up a scheduled script to run every 25 ms and update the value.
I can't use a "wait 25" function because it just hangs there and doesn't do anything else (capturing the rest of messages).
Any help would be very appreciated.
Thank you.
Scheduled scripts in PCAN Explorer
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Scheduled scripts in PCAN Explorer
You could use the Transmit List to add the signal you like to send in a default interval (for example every 25ms). Then the PE5 itself take care that the signal will automatically send every 25ms. Your script run parallel to the sending thread and you could work with the signal inside. If you change the signal, next time the 25ms are reached, the Transmit Thread will send your signal with the latest values on the Bus. But if you increase the counter in the 25ms Intervall more than one time, the last value will send. (everytime the 25ms are reached).
If your application is to complex for a simple, single thread script language, maybe you use the PCAN-Basic API and wrote your code in C#, C++, VB.Net or any othe programming language.
If your application is to complex for a simple, single thread script language, maybe you use the PCAN-Basic API and wrote your code in C#, C++, VB.Net or any othe programming language.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------