Show media files on screen with M130 like HAAS

Here is where you can request new features or special features.

Re: Show media files on screen with M130 like HAAS

Postby dezsoe » Tue Apr 10, 2018 3:09 pm

Sword wrote:I haven't tried this yet, but just a thought I had when first reading it. Vectric products can save a 'Job Sheet' in html format.... Could this somehow look for this file and if present, open it for viewing? Would be kind of nice if it opened in a stand alone window instead of a browser in this case. Possibly adding a line to your PostP file that would ask if you would like to see it or not when loading a file. Just some thoughts on making use of this. ;)

What kind of html is it? Does it contain pictures or just a description? Is is a fixed file name or the same as the g-code?
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Show media files on screen with M130 like HAAS

Postby dezsoe » Tue Apr 10, 2018 3:32 pm

Hi Terry,

OK, I didn't know this, sorry. Now I understand why are there only pictures. :) It's a good idea not to post code that only runs on test versions. I ran into the same situation with this M130...
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Show media files on screen with M130 like HAAS

Postby dezsoe » Tue Apr 10, 2018 6:07 pm

Yes! Aaaaand! If you name the image file the same as the g-code then I can change the macro to look for that file. The advantage is that it would not use any function that is not in the latest stable release (1.2047), so it could be run on that version too.

(Terry, the needs are different. :) I really hate anything that is fixed. While you like to have things in fixed folders, I prefer having them anywhere, but together. My jobs are sorted in a folder structure, so I would be very dissatisfied to store pictures in one folder and other files in another etc. And what I wold dislike the most is to store any data in the UCCNC folder! :) I almost never store programs and data on the same disk.)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Show media files on screen with M130 like HAAS

Postby Sword » Tue Apr 10, 2018 6:12 pm

Hi Dezsoe,
What kind of html is it? Does it contain pictures or just a description? Is is a fixed file name or the same as the g-code?

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.
Attachments
Job Summary.JPG
Sword
 
Posts: 16
Joined: Fri Dec 08, 2017 10:45 pm

Re: Show media files on screen with M130 like HAAS

Postby Blaise » Thu Apr 12, 2018 6:16 pm

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
Blaise
 
Posts: 81
Joined: Tue Jan 16, 2018 3:41 am

Re: Show media files on screen with M130 like HAAS

Postby dezsoe » Thu Apr 12, 2018 9:08 pm

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. :)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Show media files on screen with M130 like HAAS

Postby Blaise » Sun Apr 15, 2018 5:45 pm

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!
Blaise
 
Posts: 81
Joined: Tue Jan 16, 2018 3:41 am

Re: Show media files on screen with M130 like HAAS

Postby Dan911 » Sun Apr 15, 2018 11:16 pm

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;
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Show media files on screen with M130 like HAAS

Postby Dan911 » Tue Apr 17, 2018 2:02 am

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
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Show media files on screen with M130 like HAAS

Postby stephen18 » Fri Aug 03, 2018 9:20 am

With that version it will not work. The function for getting the current code line was introduced in 1.2101, but it had an error which was fixed in version 1.2102, so the minimum version is 1.2102.







_____________________________________________________________________________________________________________________________________
中空ステッピングモータ|Nema 17ステッピングモーター
stephen18
 
Posts: 1
Joined: Fri Aug 03, 2018 2:25 am

PreviousNext

Return to Feature Request

Who is online

Users browsing this forum: No registered users and 5 guests

cron