Using PAC Project Pro 10.5c.
I have a small chart that is mostly script blocks handling Modbus communication.
I exported the chart.
I created a new project and imported the chart.
I saved the project and did a compile all. All good as expected.
With the all code blocks closed, I changed variable names from the variable tree.
I tried to compile and found that none of the variables had changed in the script block.
That certainly sounds like odd behavior to me… Not sure if this is a support issue, but either way, could you try to force the variable names to change with Edit → Replace ?
If you are using an old version, like 8.5, this was a bug. It did not change the variables within the script blocks.
Edit replace did not work.
More info…it is not a problem with all of the variables…but a fair amount of them. Not the same variable types either.
Here is an .zip of the exported chart
exportchartrouble.zip (7.5 KB)
It references a couple of these subs. (the sub variables are not variables I am having an issue with)
Subs.zip (86.6 KB)
I tried uninstalling PAC Project 10.5c, reboot and reinstalled. Same result.
I replicated the same issue on a different computer running PAC Project 10.5c.
Got it…thanks. The chart that is being exported was developed in 10.5c.
I submitted this issue to tech support. Here is their reply. (wanted to put here in case someone else experiences the same problem)
The cause of the problem that you are having with the imported chart is having an * character after the / character on the same line of a script block.
Sand_Moisture_lbs_Blender_Feeder_Left_p = (Sand_Moisture_Percent_Blender_Feeder_Left_p / 100.0) * i_mb_Totalizer_Lbs_Old_Blender_Feeder_Left_p;
This is a bug, and I will create a ticket to fix it.
You can do the following as a workaround.
Do the desired division operations followed by multiplication on two separate lines, AND put // at the end of the first line.
Sand_Moisture_lbs_Blender_Feeder_Left_p = (Sand_Moisture_Percent_Blender_Feeder_Left_p / 100.0);//
Sand_Moisture_lbs_Blender_Feeder_Left_p = Sand_Moisture_lbs_Blender_Feeder_Left_p * i_mb_Totalizer_Lbs_Old_Blender_Feeder_Left_p;