Page 3 of 3

Re: Show media files on screen with M130 like HAAS

PostPosted: Thu Apr 12, 2018 9:08 pm
by dezsoe
Hi Blaise,

I had some issues with the html version. Now I don't have time to play with it, but later I'll try it again. :)

Re: Show media files on screen with M130 like HAAS

PostPosted: Fri Apr 13, 2018 9:36 pm
by Vmax549
IF ANYONE has seen or heard of any special feature on ANY other controller Let us know what it is . I am sure someone here will give it a shot at reproducing that feature for UCCNC.

(;-) TP

Re: Show media files on screen with M130 like HAAS

PostPosted: Sun Apr 15, 2018 5:45 pm
by Blaise
I will be working with a newly installed and bran new HAAS CNC at work so I’ll keep an eye open for cool features! Love the dinamism in this place!

Re: Show media files on screen with M130 like HAAS

PostPosted: Sun Apr 15, 2018 11:16 pm
by Dan911
Blaise wrote:Here is a look at the setup sheet created By Fusion 360:

Capture d’écran 2018-04-12 à 13.47.12.png


When I generate my gcode, Fusion creates automatically the same image shown in the top right corner of this setup sheet showing the placement of the work offset and the stock in transparent around the part.
The image is named the same as the gcode file.

Fusion also has the option of generating tool image and linking them in the gcode with M130 before each tool change! But I haven't managed to have Fusion generate the tool images and I don't know how. Images aren't generated but M130 is present for the tools.

Haas gcode export options.jpg


The part is working!

Here is are the first few lines of the generated gcode:

%
O01001 (Surfacing test Haas)
(Using high feed G1 F650. instead of G0.)
(T1 D=0.5 CR=0. - ZMIN=-0.88 - flat end mill)
(T2 D=0.25 CR=0. - ZMIN=-0.8921 - flat end mill)
(T3 D=0.25 CR=0.125 - ZMIN=-0.9654 - ball end mill)
N10 G90 G94 G17
N15 G20
N20 G53 G0 Z0.

(Face1 2)
N25 M130 (tool1.png)
N30 T1 M6
N35 S7640 M3
N40 M130 (1001.png)
N45 G54
N50 M8
N55 G0 X3.325 Y-0.4938
N60 G43 Z0.6 H1
N65 T2
N70 G0 Z0.2
N75 G1 Z-0.0365 F92.
N80 G18 G3 X3.275 Z-0.0865 I-0.05 K0.
N85 G1 X3.
N90 X0.
N95 G17 G2 Y-0.2423 I0. J0.1257
N100 G1 X3.
N105 G18 G2 X3.05 Z-0.0365 I0. K0.05
N110 G0 Z0.6

(Adaptive1 2)
N115 M130 (1001.png)
N120 G1 X1.6505 Y0.4024 F650.
N125 G0 Z0.5906
N130 Z-0.3948
N135 G1 Z-0.4448 F92.
N140 X1.6508 Y0.4022 Z-0.4504
N145 X1.6516 Y0.4017 Z-0.456
N150 X1.6529 Y0.4008 Z-0.4614
N155 X1.6546 Y0.3997 Z-0.4665
N160 X1.6569 Y0.3982 Z-0.4714
N165 X1.6596 Y0.3964 Z-0.476
N170 X1.6628 Y0.3943 Z-0.4802
...

Hope this helps!

- Blaise


Hi Blaise,
Looking at the format Fusion 360 writes the M130 in Gcode Dezsoe's macro would need editing to work. I copied from Dezsoe's Macro and edited so should work without editing besides the folder location in macro to find images location.

**EdiT** You would need UCCNC 1.2102 version or higher.

Code: Select all
string m130 = exec.Getcurrgcodelinetext();
string output = m130.Split('(', ')')[1];
string Path = @"C:\UCCNC\Flashscreen\BMP\Defaultscreenset\"+ output; // put your path folder for images between quotations

if (System.IO.File.Exists(Path))
{
Form1 = new Form();
Form1.Size = new System.Drawing.Size(1000, 800);
Form1.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
Form1.Text = "Folder Path = "+Path;
Form1.AutoSize = true;

PictureBox pictureBox1 = new PictureBox();
pictureBox1.Size = new System.Drawing.Size(1000, 800);
pictureBox1.Location = new System.Drawing.Point(10, 10);
pictureBox1.ImageLocation = Path;
pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;



Form1.Controls.Add(pictureBox1);

Form1.ShowDialog();
}

else {MessageBox.Show("File name "+output+" could not be found in folder path "+Path); return;}

#Events

Form Form1;

Re: Show media files on screen with M130 like HAAS

PostPosted: Tue Apr 17, 2018 2:02 am
by Dan911
Sword wrote:It can be any name, but generally the same as the design file like 'New_Summary.html' It's basically a web page and looks like this.


Hi Sword I missed your post, with Vectric software you would need to add the M130(New_Summary.html) manually to your Gcode but can be done with similar macro with a html file. I used the Example_codes folder in UCCNC with macro below to test with "C:\UCCNC\Example_codes" but can be edited to any folder to put your html file in.



You would need UCCNC 1.2102 version or higher.

M130.txt
Code: Select all
string m130 = exec.Getcurrgcodelinetext();
string output = m130.Split('(', ')')[1];
string Path = @"C:\UCCNC\Example_codes\"+ output; // put your path folder for image between quotations

if (System.IO.File.Exists(Path))
{
System.Diagnostics.Process.Start(Path);
MessageBox.Show(new Form() { TopMost = true }, "When this window is closed Gcode will continue");
}

else {MessageBox.Show("File name "+output+" could not be found in folder path "+Path); return;}



Dan