Send g-code from HSM INVENTOR EDIT

Send g-code from HSM INVENTOR EDIT

Anonymous
Not applicable
1,714 Views
18 Replies
Message 1 of 19

Send g-code from HSM INVENTOR EDIT

Anonymous
Not applicable

Hello everyone, 

I have a  problem to connect with the port

I have a Nport 5110 moxa and I am using Nport Administrator.

When I try to send the gcode from Hsm edit transmission, I always have this message : Impossible to open the port

I dont really know how can I solve this problem ?

Does anyone have an idea how can I deal with this issue please ?

 

0 Likes
Accepted solutions (3)
1,715 Views
18 Replies
Replies (18)
Message 2 of 19

Laurens-3DTechDraw
Mentor
Mentor
Accepted solution

@Anonymous wrote:

Hello everyone, 

I have a  problem to connect with the port

I have a Nport 5110 moxa and I am using Nport Administrator.

When I try to send the gcode from Hsm edit transmission, I always have this message : Impossible to open the port

I dont really know how can I solve this problem ?

Does anyone have an idea how can I deal with this issue please ?

 


I had the same issue setting up our 5110.

I had to change the Nports IP-adress to something within our network setup.

By default it had a weird IP, it doesn't look at the DHCP server.

 

So this box:

Nport.png

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Message 3 of 19

Anonymous
Not applicable

Hello @Laurens-3DTechDraw

 Thank you very much for your precious help. I solved the problem which exists between the computer and the nport 5110, but still have the problem between machine and Moxa Nport 5110. The machine does not receive  the G-code ( my machine is emcotronic tm02 turning)

 

I think maybe there is a little problem with my g-code, can you tell please how can I have a width : 4 for the sequence number ? ( I mean that instead of N00 G00 X20 Z30, I want to have N0000 G00 X20 Z30 )

How can I modify that in my post processor please ? 

Thank you again for your help and your responses.

0 Likes
Message 4 of 19

ArjanDijk
Advisor
Advisor

Your machine control is pretty picky from what I experienced. 

This comes out of a postprocessor I make for a customer with an Emco 240

%1001 
N0010  G71
N0020  G54
N0030  G0 X280. Z300.
N0040  G92 S2000 X0. Z122.
N0050  G59
N0060  T0101
N0070  G54
N0080  M8
N0090  G94
N0100  G97 S4000 M3
N0110  G0 X80. Z0.
N0120  G0 Z1.414
N0130  G1 X62.828 F500.
N0140  X60. Z0.
N0150  X-1.6
N0160  X1.228 Z1.414
N0170  G0 X80.
N0180  Z0.
N0190  M9
N0200  G53
N0210  G56
N0220  T0100
N0230  X280. Z300.
N0240  M30

Inventor HSM and Fusion 360 CAM trainer and postprocessor builder in the Netherlands and Belgium.


Message 5 of 19

Anonymous
Not applicable

Exactly ! That s the right g - code that I need to have, after all the modifications I did on the PP of fanuc turning ,  I succeed to have a gcode similar to this one.

 Don't you have an idea about how can I modify the width of the sequence number " N " in the PProcessor ? 

Thank you again for your help.

 

0 Likes
Message 6 of 19

ArjanDijk
Advisor
Advisor
Accepted solution
 
var numFormat = createFormat({width:(4), zeropad:true, decimals:0});//Programformat
function writeBlock() {
  if (properties.showSequenceNumbers) {
    if (optionalSection) {
      var text = formatWords(arguments);
      if (text) {
        writeWords("/", "N" + numFormat.format(sequenceNumber), text);
      }
    } else {
      writeWords2("N" + numFormat.format(sequenceNumber)+" ", arguments);
    }
    sequenceNumber += properties.sequenceNumberIncrement;
  } else {
    if (optionalSection) {
      writeWords2("/", arguments);
    } else {
      writeWords(arguments);
    }
  }
}

Inventor HSM and Fusion 360 CAM trainer and postprocessor builder in the Netherlands and Belgium.


Message 7 of 19

Anonymous
Not applicable

The solution works very good. Thank you so much for this help 

0 Likes
Message 8 of 19

Laurens-3DTechDraw
Mentor
Mentor

What was the issue between the PC and the NPORT 5110?

If you post the solution here others can benefit from it as well.

 

I highly doubt that you need a 4digit number. But you could make that.

Is some work in the post, so I would advise on first trying it by manually adding the numbers to your code and see if the machine takes it like that.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


0 Likes
Message 9 of 19

ArjanDijk
Advisor
Advisor

As said @Laurens-3DTechDraw, this machine is very picky


Inventor HSM and Fusion 360 CAM trainer and postprocessor builder in the Netherlands and Belgium.


0 Likes
Message 10 of 19

Anonymous
Not applicable

Hi @Laurens-3DTechDraw

The problem between the computer and the Nport 5110 is solved when I entered the parameters in the web console moxa (online), and I deleted the software Nport administrator, I kept just Nport driver manager.

Right now I am doing the tests, I succeed in sending just the number like 95 08 ... to the machine but not the letters like N G S T ...

I read the first line in the screen of my machine like this : O 1001 then I have a error message : 600 bad order of entrance.

I contacted the society from where I got the machine and they send a gcode that I succeed to read in my machine (letters and numbers without any message error)

Do you have an idea please of the source of the problem or how can I deal with it ?

0 Likes
Message 11 of 19

Anonymous
Not applicable

Hello  @ArjanDijk

Yeah it is not easy to succeed in sending code the machine, but I have no choice, we need to use to finish some projects.

 

As I told your collegue,  now I am doing the tests, I succeed in sending just the number like 95 08 ... to the machine but not the letters like N G S T ...

 I have a error message : 600 bad order of entrance. (after the first line)

I contacted the society from where I bought the machine and they send a g-code that I succeed to receive in my machine without any error message.

I really dont know how to deal with that, even when I tap by the keyboard the letters, they are not read by the machine and the send operation. Do you have an idea how can I deal with that? I changed the ASCII in the PP, I put ISO instead, but nothing has changed 😞

0 Likes
Message 12 of 19

Laurens-3DTechDraw
Mentor
Mentor

Can you upload the sample file they send you?

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


0 Likes
Message 13 of 19

Anonymous
Not applicable

Yeah sure @Laurens-3DTechDraw

I could not put it in attach, so I copy paste here in the message

%0001
N0040 G92 Z110.500
N0050 G59
N0051 G92 S3000
N0070 T0101
N0080 G96 S300 M04 M08
N0090 G00 X24.000 Z0.000
N0100 G01 X-1.000 F150
N0110 G00 X50.000 Z70.000
N0120 T0202
N0130 G97 S3000 M03 M08
N0140 G00 X0.000 Z2.000
N0200 G88 Z-27.000 D3=5000 F60 D6=3000 D5=30
N0210 G00 X50.000 Z10.000
N0220 T0404
N0230 G96 S300 M03
N0240 G00 X13.000 Z2.000
N0250 G01 X9.800 Z-8.000 F100
N0260 G00 Z2.000
N0270 G00 X15.600
N0280 G01 X9.200 Z-15.000
N0290 G00 Z2.000
N0300 X17.600
N0310 G01 X9.200 Z-21.200
N0320 G00 Z2.000
N0330 X21.000
N0340 G41
N0350 G01 Z0.000
N0360 X19.000
N0370 G02 X17.000 Z-1.000 I0.000 K-1.000
N0380 G01 X8.460 Z-24.600
N0390 G00 Z2.000
N0400 G40
N0410 G00 X50.000 Z30.000
N0420 T0101 N0430 G96 S300 M04
N0440 G00 X24.000 Z0.000
N0450 G01 X22.000 F100
N0460 X18.000 Z-7.500
N0470 Z-14.000 X19.000
N0490 Z-17.000
N0500 X14.000 Z-26.000
N0510 G01 X17.000 Z-27.000
N0670 G00 X20.000
N0671 Z-9.200
N0672 G01 X16.000 F30
N0673 G00 X18.000
N0674 Z-7.800
N0675 G01 X16.400
N0676 G00 X22.000
N0680 X50.000 Z60.000
N0690 T0101
N0700 G97 S3000 M04
N0800 X16.000 Z2.000
N0810 G42
N0820 G01 Z0.000 F100
N0840 G01 X19.000 F100
N0850 G03 X21.000 Z-1.000 I0.000 K-1.000
N0860 G01 X17.000 Z-7.500 F100
N0880 G01 X15.000 Z-13.000
N0881 X16.000
N0890 G03 X18.000 Z-14.000 I0.000 K-1.000
N0900 G01 Z-19.000
N0910 G01 X13.000
N0930 Z-24.400
N0940 G02 X16.000 Z-26.937 I3.000 K0.000
N0950 G01 Z-30.700
N0960 G00 X24.000
N0970 G40
N0980 G00 X50.000 Z60.000
N0990 T0303
N1000 G97 S3000 M04
N1010 G00 X24.000 Z-22.000
N1020 G41
N1030 G01 X17.000 Z-21.000
N1031 G03 X13.000 Z-19.000 I0.000 K2.000
N1040 X13.800 G01 Z-16.000
N1050 G03 X15.800 Z-15.000 I1.000 K0.000
N1060 G01 X16.000
N1070 G02 X18.000 Z-14.000 I0.000 K1.000
N1080 Z-12.000 G01
N1090 G00 X24.000
N1100 Z0.000
N1110 G40
N1120 G00 X50.000 Z60.000
N1130 T0707
N1140 G96 S300 M04
N1150 G00 X24.000 Z-29.200
N1160 G01 X5.000 F50
N1170 G00 X16.200
N1180 G00 Z-27.800
N1190 G01 X14.000 Z-29.000 F100
N1200 G01 X4.000
N1210 G97 S500
N1220 G01 X0.000 F30
N1230
N1240 G00 X24.000
N1250 X50.000 Z40.000
N1260 G56 G53 T0000
N1270 M30

0 Likes
Message 14 of 19

Anonymous
Not applicable

@Laurens-3DTechDraw  @ArjanDijk

Just to share here with you the solution of the issue I had with the letters in my gcode, I contacted the company and they helped me with that. In fact the solution was to add a space after the number of the program, which is not visible but we must have it so that the machine can receive the whole code without a problem. I added it just by keyboard in the blocnotes

 

How can I please add the space after the number of the code in the post processor please? and how can I have the number of the code in the same line as % ? 

like that : %1111space

Thank you for your attention

0 Likes
Message 15 of 19

Laurens-3DTechDraw
Mentor
Mentor
Accepted solution

I expect there is this or very similar in your post:

  writeln("%");
 
  if (programName) {
    var programId;
    try {
      programId = getAsInt(programName);
    } catch(e) {
      error(localize("Program name must be a number."));
      return;
    }
    if (properties.o8) {
      if (!((programId >= 1) && (programId <= 99999999))) {
        error(localize("Program number is out of range."));
        return;
      }
    } else {
      if (!((programId >= 1) && (programId <= 9999))) {
        error(localize("Program number is out of range."));
        return;
      }
    }
    if ((programId >= 8000) && (programId <= 9999)) {
      warning(localize("Program number is reserved by tool builder."));
    }
    oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0});
    if (programComment) {
      writeln("O" + oFormat.format(programId) + " (" + filterText(String(programComment).toUpperCase(), permittedCommentChars) + ")");
    } else {
      writeln("O" + oFormat.format(programId));
    }
    lastSubprogram = programId;
  } else {
    error(localize("Program name has not been specified."));
    return;
  }

Change that to:

  if (programName) {
    var programId;
    try {
      programId = getAsInt(programName);
    } catch(e) {
      error(localize("Program name must be a number."));
      return;
    }
    if (properties.o8) {
      if (!((programId >= 1) && (programId <= 99999999))) {
        error(localize("Program number is out of range."));
        return;
      }
    } else {
      if (!((programId >= 1) && (programId <= 9999))) {
        error(localize("Program number is out of range."));
        return;
      }
    }
    if ((programId >= 8000) && (programId <= 9999)) {
      warning(localize("Program number is reserved by tool builder."));
    }
    oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0});
      writeln("%" + oFormat.format(programId) + " ");
    lastSubprogram = programId;
  } else {
    error(localize("Program name has not been specified."));
    return;
  }

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Message 16 of 19

Anonymous
Not applicable

Exactly!

Thank you very much for the help

0 Likes
Message 17 of 19

Anonymous
Not applicable

Hi @Laurens-3DTechDraw

I am still working on the modification of my post processor for my machine emco tm02.

I used the PP for Fanuc Turning and I did all the modifications.

Today by doing the tests, I discovered that I have a problem  with the function of tapping cycle G33 ( or G84 with Fanuc turning). 

For my machine I dont have the same parameters, so I need to have a code as this one :

T0606

G97 S250 M03

G00 X0 Z10

G00 Z2

G33 X0 Z-14 F1000

G33 X0 Z2 F1000 M04   <-- Z2 : is the distance of retraction

G00 X50 Z20 

M30

 

For the second line of G33 I did not know how to define this distance of retraction in the post processor, this example of code I did it manually.

Can you please help me ?

thank you for your attention and your precious help

 

0 Likes
Message 18 of 19

Laurens-3DTechDraw
Mentor
Mentor

Could you upload your current post here?

Would make it a lot easier to help.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


0 Likes
Message 19 of 19

Anonymous
Not applicable

Hello @Laurens-3DTechDraw

Thanks for your response, well I tried to fix a distance of z=2 in my PP so the problem is solved.

Now I have a new issue with my machine which still send me alarms when I transfer the program (gcode)

In fact I need to delete the lines in the start of the program : 

%
( 1001 )
( T05 - ZMIN=-11. - FRAISE BOUT PLAT )
( T15 - ZMIN=-19.305 - PERAGE )
( T17 - ZMIN=-3. - FORET CENTRER )
( T18 - ZMIN=-0.1 - FRAISE CHANFREINER )

N10 M09
N15 G340
N20 G47
( PERCAGE )
N25 G45 T17
N30 G341
N35 G99 PA1 M03 S5820
N40 M07
N45 G00 X58. Y-46.25
N50 G00 Z50.
N55 G00 Z20.
N60 G81 X58. Y-46.25 Z-3. R2. F100.
N65 X30. Y-48.25
N70 X-30.
N75 X-58. Y-46.25
N80 Y46.25
N85 X-30. Y48.25
N90 X30.
N95 X58. Y46.25
N100 G80
N105 G00 Z50.
N110 M09
N115 G340
N120 G47

 

Well I must not have the N10 N15 N20, how can I modify that in the PP

Attached you are going to find my PP 

Thank you so much, I am waiting a response from you

Have a good day

0 Likes