Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Siemens 840 Comma Delimit during Cycle


Recommended Posts

I'm having an issue with implementing an array on a DMG Mori (Siemens 840d) inside of a cycle.

The cycle that gets posted looks like this: CYCLE800 (0,"TC8",100000,57,-1.03847,-7.3891,-0.52993,44.72,-5.648,0.,0,0,0,-1)
What I'm looking for is something that looks like this: CYCLE800 (0,"TC8",100000,57,-1.03847,-7.3891,-0.52993,44.72,-5.648,0.,_PFS[1,0],_PFS[1,1],0,-1)

However, the comma between the row and the column is escaping the field that it should be filling out.

Has anyone faced this issue before, and if so what did you come up with?

Link to comment
Share on other sites

What kind of Kinematics are you working with? You show PFS, but my documentation on CYCLE800 shows this. What does your programming manual say the CYCLE800 is suppose to look like. When you click on the soft key on the control for the CYCLE800 what does it show you for each of them? Trying to reach out to SIEMENS Germany for help is a go back to DMG Mori and DMG Mori will tell you to contact SIEMENS. The post builder needs a good format that works on the machine then they can configure the post to support it.

CYCLE800(<_FR>, <_TC>, <_ST>, <_MODE>, <_X0>, <_Y0>, <_Z0>, <_A>, <_B>, <_C>, <_X1>, <_Y1>, <_Z1>, <_DIR>, <_FR_I>, <_DMODE>)

Link to comment
Share on other sites
6 minutes ago, crazy^millman said:

What kind of Kinematics are you working with? You show PFS, but my documentation on CYCLE800 shows this. What does your programming manual say the CYCLE800 is suppose to look like. When you click on the soft key on the control for the CYCLE800 what does it show you for each of them? Trying to reach out to SIEMENS Germany for help is a go back to DMG Mori and DMG Mori will tell you to contact SIEMENS. The post builder needs a good format that works on the machine then they can configure the post to support it.

CYCLE800(<_FR>, <_TC>, <_ST>, <_MODE>, <_X0>, <_Y0>, <_Z0>, <_A>, <_B>, <_C>, <_X1>, <_Y1>, <_Z1>, <_DIR>, <_FR_I>, <_DMODE>)

Kinematics are table/table A/C trunnion style, DMU85 FD. _PFS[x,y] is an array variable I've added to the machine using a UGUD (no need to pass it in every time and the data is saved.) You are correct with the Cycle layout. I'm trying to work with <_X1>, <_Y1>. However, when you try to pass, lets say _PFS[1,0], _PFS[1,1] this is what happens. It sees the comma in the field for the X1 value and escapes to the next field, in this case Y. Fills in the remainder of the array variable for X and then hits the delimiter. This error continues outside of the fields shown. In this example _PFS[1,0] should be entirely in the X1 field and _PFS[1,1] should be in the Y1 field. Z1 should be blank.

 

Link to comment
Share on other sites
2 hours ago, Manofwar said:

Kinematics are table/table A/C trunnion style, DMU85 FD. _PFS[x,y] is an array variable I've added to the machine using a UGUD (no need to pass it in every time and the data is saved.) You are correct with the Cycle layout. I'm trying to work with <_X1>, <_Y1>. However, when you try to pass, lets say _PFS[1,0], _PFS[1,1] this is what happens. It sees the comma in the field for the X1 value and escapes to the next field, in this case Y. Fills in the remainder of the array variable for X and then hits the delimiter. This error continues outside of the fields shown. In this example _PFS[1,0] should be entirely in the X1 field and _PFS[1,1] should be in the Y1 field. Z1 should be blank.

 

So when you run the machine with the output at 0,0,0 for those fields what does it do? I have programmed different FD machines using the standard CYCLE800 and never had a problem. What problems are you running to with the standard CYCLE800?

Link to comment
Share on other sites
24 minutes ago, crazy^millman said:

So when you run the machine with the output at 0,0,0 for those fields what does it do? I have programmed different FD machines using the standard CYCLE800 and never had a problem. What problems are you running to with the standard CYCLE800?

The cycle type is not the issue. I'm using CYCLE800 as an example. The problem is passing a 2D (or 3D) array to any cycle.  Cycle800 works fine from the post and on the machine.

Currently I don't think this can be done. I believe only 1-dimensional array variables can be passed to cycles. I may rewrite what I'm doing to use that. However, if anyone has a solution for 2D/3D arrays being passed to cycles please post it.

Link to comment
Share on other sites

This video covers the data array tables much better then I can describe it.

https://youtu.be/YK8hqu3qukU

 

You can stack CYCLE800, I just don't like that method, as additive mode can be dangerous. By using the built in X1, Y1, Z1 you position shift after calling position and rotation without having to post out multiple CYCLE800 lines or using additive mode.

I'm machining 3D printed parts. Because the feature location drift a bit from print to print some features get defined as machine in place. (capture local data and machine locally.)

So, I load the part, run a program to probe those feature locations, save that data to an array named _PFS[n,m] (where the array is loaded into a GUD as DEF NCK REAL _PFS[30,2] before hand) it would look like the example below.

(Example only) Port 3 location X-.0067 Y.0032

                                                            ^ This data is stored from the probe as _OVR[5] for X, and _OVR[6] for Y.
I store this data in the array like this:

_PFS[3,0] = _OVR[5] (This stores the actual X deviation)

_PFS[3,1] = _OVR[6] (This stores the Y deviation)

 

Then later on, in the actual machining program I can call that data from the location as you would call any variable. This causes an issue because of how the data is delimited in both arrays and cycles. The array needs the comma to tell it row, column. The cycle needs it to move to the next field. In the below picture you can see what happens when the control hits the comma in the array. It sees "_PFS[1" sees a comma so it moves to the next field and types "0]" the same would happen for Y1 except it starts in the Z1 and moves outside of the range of CYCLE800's displayed fields. 

EMC.png.ca797667bad3f0cabbce0db213241ffb.png

Hopefully this provides a clearer picture of the problem.

 

There are other many other ways to perform this task, I just wanted to see if I could get it this way.

Link to comment
Share on other sites

Yeah I see what you are trying to accomplish with storing the location data in the variable sets then access them. I would try probing the feature with CYCLE800 active and have it update the position of the CYCLE800 values then do the math back to the original Workoffset to adjust as needed. Use the Original placement as the base and then do math to adjust the CYCLE800 not only with position, but YAW,PITCH,ROLL to see if that allow for the differences to be easily accounted for. Deep material you are digging into and not enough time to review everything you put up, but I will review it as time permits. I would be interested in how you work it our if you don't mind sharing it. Thank you for posting such an interesting topic.

Link to comment
Share on other sites

For all who were curious. I don't believe passing a 2D array to a Cycle is currently possible. I tried multiple ways implementing this and couldn't get it. The book doesn't list an escape character, or those listed don't work. I also tried to concatenate in a comma using a temporary place holder variable to hold the comma, this also failed. If anyone else comes up with a solution (not that it's need, more out of a fun problem) please post it. Below is how I ended coding it. 1D arrays. PFS would be run before the drill is called (hence the Boolean check at the top for running the sub) and assign values to them.
 


IF _PFS_RAN <> 1 CALL "PFS.SPF"

IF RS_Main_Loop <> 0  GOTOF ("OPERATION_"<<RS_Main_Loop)
RS_Main_Loop=8


OPERATION_23:
; 04_Port_Drilling
    CALL "PREP_LINE.SPF"
    T="MIT_DRILL_3937_2D_140" M6
    S970 M3 M73 M7 M161
    D1
    G60
    IF RS_Sub_Loop <> 0  GOTOF ("Port_"<<RS_Sub_Loop)
    RS_Sub_Loop=2
    Port_2:
        CYCLE800 (0,"TC8",100000,57,-2.03389,-7.33396,-1.4988,43.939,-10.892,0.,_PFS_X[2],_PFS_Y[2],0,-1)
        CALL "23_04_Port_Drilling_02.SPF"
        G00 SUPA Z=-.5
        RS_Sub_Loop=RS_Sub_Loop+1
    Port_3:
        CYCLE800 (0,"TC8",100000,57,-1.03847,-7.3891,-0.52993,44.72,-5.648,0.,_PFS_X[3],_PFS_Y[3],0,-1)
        CALL "23_04_Port_Drilling_01.SPF"
        G00 SUPA Z=-.5
        RS_Sub_Loop=RS_Sub_Loop+1
    Port_4:
        CYCLE800 (0,"TC8",100000,57,5.11368,4.60438,-1.19746,-33.788,31.701,109.373,_PFS_X[4],_PFS_Y[4],0,-1)
        CALL "23_04_Port_Drilling_07.SPF"
        G00 SUPA Z=-.5
        RS_Sub_Loop=RS_Sub_Loop+1
    Port_5:
        CYCLE800 (0,"TC8",100000,57,3.80065,5.85249,-1.10746,-39.986,22.651,180.,_PFS_X[5],_PFS_Y[5],0,-1)
        CALL "23_04_Port_Drilling_06.SPF"
        G00 SUPA Z=-.5
        RS_Sub_Loop=RS_Sub_Loop+1
    Port_6:
        CYCLE800 (0,"TC8",100000,57,2.22723,6.85471,-1.90209,-43.563,12.621,180.,_PFS_X[6],_PFS_Y[6],0,-1)
        CALL "23_04_Port_Drilling_05.SPF"
        G00 SUPA Z=-.5
        RS_Sub_Loop=RS_Sub_Loop+1
    Port_7:
        CYCLE800 (0,"TC8",100000,57,-3.67067,6.3578,-0.78282,-40.893,-20.705,180.,_PFS_X[7],_PFS_Y[7],0,-1)
        CALL "23_04_Port_Drilling_04.SPF"
        G00 SUPA Z=-.5
        RS_Sub_Loop=RS_Sub_Loop+1        
    Port_8:
        CYCLE800 (0,"TC8",100000,57,-7.45717,-0.26041,-0.52993,1.999,-44.965,271.413,_PFS_X[8],_PFS_Y[8],0,-1)
        CALL "23_04_Port_Drilling_03.SPF"
        G00 SUPA Z=-.5
        RS_Sub_Loop=0
    G00 SUPA Z0.
    RS_Main_Loop=24

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...