|
Post by cwegman on Oct 17, 2015 13:13:49 GMT
I have some utility functions written in C. Is it possible to combine those with the generated code. What would be the preferred way to do so. Thanks.
Christian
|
|
|
Post by Admin on Oct 17, 2015 13:24:12 GMT
Yes, you can do that. File native.cpp of your project contains all the boilerplate C code for your sketch. You can define and call any functions there. But you can also use the multi-file approach (which is the best thing to do if you have an existing library) as is described here. Note that a PLC program relies on a main loop running over and over again without significant delays. So functions that block or delay execution (delay,delayMicroseconds) are to be avoided. SimPyLC timers don't suffer from that problem, they don't block execution. Jacques
|
|