Delta Tau Forums
Is it possible to run fload on build and download? - Printable Version

+- Delta Tau Forums (http://forums.deltatau.com)
+-- Forum: Delta Tau Data Systems (http://forums.deltatau.com/forumdisplay.php?fid=1)
+--- Forum: Power PMAC (http://forums.deltatau.com/forumdisplay.php?fid=2)
+--- Thread: Is it possible to run fload on build and download? (/showthread.php?tid=2872)



Is it possible to run fload on build and download? - maxvoxel8 - 04-16-2019

We have a pp_custom_save.tpl script which saves some variables. But they are initialized to 0 in the header files. We find that when we build and download, the variables are initialized to 0, and we would like to automatically run fload to give them their last-saved value. How can we do this?


RE: Is it possible to run fload on build and download? - steve.milici - 04-16-2019

This should be executed as the first thing in a “run once” power-on PLC.


RE: Is it possible to run fload on build and download? - maxvoxel8 - 04-17-2019

Is that defined in pp_startup.txt? We are using the default version which runs InitializePlc, and we do have fload in there. But that seems to only run when we actually restart the controller. Is it supposed to run when we just build and download?


RE: Is it possible to run fload on build and download? - Eric Hotchkiss - 04-29-2019

Startup PLC's would be enabled in pp_startup.txt with a line like "Enable PLC InitializePlc".

pp_startup.txt should run on build and download. I just did a test on a CK3E with firmware 2.5 and it runs (just set a P Variable).


RE: Is it possible to run fload on build and download? - maxvoxel8 - 05-10-2019

Yes, we have an initialize PLC and it looks like it does run as it should. The issue is that if we've changed some variables and we build and download, the variables get initialized, and then the fload loads the last-saved values. What we need is some way to automatically run fsave before the build and download process starts to save the current values. Is there any way to do that?


RE: Is it possible to run fload on build and download? - steve.milici - 05-13-2019

Before a “Build and Download” the contents of the file “pp_disable.txt” is executed. This is probably not a good place for “fsave” as this command does not immediately finish execution. It must use the underlying Linux to create a file and there are no “timing” or “wait” features to hold off the continuation of the “Build and Download” to wait for the “fsave” to finish.

This would be best done as an online command in the terminal window.


RE: Is it possible to run fload on build and download? - maxvoxel8 - 05-13-2019

Ok, thanks. Are you sure there is no way to delay execution by issuing a system command or something like that?

As an aside, I see there is also pp_inc_disable and pp_inc_startup. What are these used for?


RE: Is it possible to run fload on build and download? - steve.milici - 05-14-2019

(05-13-2019, 01:25 PM)maxvoxel8 Wrote: Ok, thanks. Are you sure there is no way to delay execution by issuing a system command or something like that?

As an aside, I see there is also pp_inc_disable and pp_inc_startup. What are these used for?

No - as "pp_startup.txt" is sent in a single communication thread.

See the IDE manual under the chapter "The Configuration Folder" for a good description of pp_inc_disable.txt and pp_inc_startup.txt.