Cam Profile Creation from SD card
Attached is a demo program that contains two subprograms to import data from a file on a PDMM SD card, or export data from an array to the SD card. This data can then be used to build a cam profile in the program and update the motion on the slave axis while everything is running. I also like to note that the file import/export functions can be a large burden on the PDMM processor and we do not recommend to have axes moving while using the functions. Best that you do all of your reading/writing before starting machine processes.
As for running the demo program, from the control panel you can set a cam profile with up to 10 points and export it to an SD card with a user editable file name, open a cam profile with the same name variable, and switch cam meaning build the profile with a ProfileBuild function and call a MC_CamIn to have it active on Axis 2.
I automatically fill in a base profile to the ProfileData structure array in the P1 tab of the second step of the SFC program Main. The user can edit all of the points from the watch window, which is how I tested the program. I made changes to the profiledata array, exported it and have that as the attached file called testprofile, and was able to later import it and everything was able to be built and run correctly. You can open the testprofile file with wordpad and see that the first four lines are the profile properties (master and slave offset and scale values) and then it goes through the master point, slave point, segment type, velocity, and acceleration for each of the desired cam points.