I’m working with Production Manager on a material handling cell. The individual parts that selected in PM run the same code each time but, they load different offsets and load data for that part.
I am trying to stream line the new part setup of production manager by moving the data in each of our parts to advanced part data that would be loaded with each different part. The data for each part would be filled out with a custom screen on the pendant.
I think have most of this worked out other than one probably simple aspect that I don’t know how to do. That is exact the name of the advantage data currently selected and update it with my screen values.
I can extract the name of the part data that is currently selected by PM with.
My custom record for the advanced datatype that I will pollute form a screen and then write with a trap.
Declaration of my advanced part data type
RECORD test1
num nRack_Y_offset_local1;
num nRack_Z_Rotation_local1;
num nHolder_LX_offset_local1;
num nHolder_LY_offset_local1;
num nHolder_LZ_rotation_local1;
num nHolder_UX_offset_local1;
num nHolder_UY_offset_local1;
num nHolder_UZ_rotation_local1;
num nOutfeed_X_offset_local1;
num nOutfeed_Y_offset_local1;
num nOutfeed_Z_rotation_local1;
string stPartName_local1;
num nPartLenght_loca1l;
num nPartWidth1;
num nPartThick_local1;
num nPartMass_local1;
num nNumPartsOnArm_local1;
Endrecord
Example PM partdata and advanced part data.
TASK PERS partdata pd_rTestAdvanced_Stn1:=“TestAdvancedPartdata”,“testpart”,“”,2,0,“”,“testpart”];
TASK PERS test1 testpart:=[1,2,3,4,5,6,7,8,9,0,1,“”,0,0,0,0,0];
I can pull the name of the name pf the active partdata with this PM instruction to get the string format of the name.
VAR string stPartDataName;
VAR partdata pdTmpWrite;
PMgrGetNextPart station,pdTmpChk\InstanceName:=stPartDataName;
What I don’t know how to do is use this string of the active part “stPartDataName” to select the active advanced part data. Below is what I think it would look like is but, I need to use the name in stPartDataName replace the pdTmpWrite below.
**pdTmpWrite.**advPart:=(nRack_Y_offset, nRack_Z_Rotation, …etc)
effective what I have below but, this obviously doesn’t work.
“stPartDataName”.advpart:=(nRack_Y_offset, nRack_Z_Rotation, …etc)
This is probably simple and obvious but, I’ve looked for several hours for an example of this and not luck. I know some advanced things in rapid but, the simple things stump me. Thanks in advance for any input.