M6 with air cilinders

Stefan
Posts: 15
Joined: Wed Oct 16, 2019 11:22 am

M6 with air cilinders

Post by Stefan »

Hi,
It is ET6 and I want to use Relays ON/OFF instead of Z motion DOWN/UP because my machine is plotter/cutter2D with X,Y ,C-tangent knife, and pen. Both tools are pushed down by air cillinders linked to relay 1 and 2. When the tool is UP(G0) relays are OFF , when is DOWN(G1) relay 1 or 2 is ON depends on the tool(layer in dxf). Same if tangent lift is needed.

I'm trying to run g-code from DXF module in myCNC with M6 modified like http://docs.pv-automation.com/mycnc/m6_ ... pneumatics
but it blocks at first M6 line. Just turn relay ON and nothing more.
gcode.png
M6 is
M6.png
I have made tests with the g-code, I use M62 instead of M6 and result is the same. Relay is on and waiting ....... May be the issue is around M62?!?!
M62 is :

//turn on digital output synchronized with motion
main()
{
portset(eparam);

exit(99); //normal exit
};

Another thing I've noticed is M62P1 turns relay2 and M62P2 turns open colector1.
M62P0 turns relay1 but only in manual g-code.

Need help to solve this problem.

mycnc
Posts: 1027
Joined: Thu May 10, 2018 2:42 pm
Location: Ottawa, Canada
Contact:

Re: M6 with air cilinders

Post by mycnc »

A possible reason is a "working area control".
All your coordinates are "0" and the system may block running a g-code.

Jog somewhere in the middle of working area (X,Y are positive, Z is negative), reset work coordinates at this position,
reload g-code and try again.

Image


Do you have any message under "Log" Tab?

Try if simple g-code file without M-codes will be running?

Stefan
Posts: 15
Joined: Wed Oct 16, 2019 11:22 am

Re: M6 with air cilinders

Post by Stefan »

No problem with working area.
Log is fine : Program file "***.nc" loaded

Without M is OK. With default M6 is OK.

Test with simple code with M62 only . same issue .

mycnc
Posts: 1027
Joined: Thu May 10, 2018 2:42 pm
Location: Ottawa, Canada
Contact:

Re: M6 with air cilinders

Post by mycnc »

M62, M63 are the simplest PLC and should not stop running.

please check if you have the same codes for M62, M63 as on the screenshots below
and recompile the PLC codes - press 3 buttons on the right in series:
-Save All
-Build All (check if no error messages in log widget on the bottom)
-Send

Then try again

Image

Image

Stefan
Posts: 15
Joined: Wed Oct 16, 2019 11:22 am

Re: M6 with air cilinders

Post by Stefan »

M62 seems like yours.

Image

When press Build All the program is close ?!?
When press Send this message PLC disk image is not found.
M62send.png
Attachments
M62.png

ivan
Posts: 360
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: M6 with air cilinders

Post by ivan »

The Build All button causing the program to close is likely due to a bug that was fixed a little while back. It is quite possible that you are using a software build that still had that issue - most likely one of the PLC procedures has had its code corrupted and is causing these problems.

There are two ways of fixing this:

1) Updating all the PLC procedures to their default state through the myCNC software. To do this, go to Settings > Support, and enter your profile name into the Profile Name to Load field (from your screenshots, it seems like you are using the X1366V profile). Enter * (star) in the Controller UID field. For the date, select the 2019-1018-093408 version. Leave a check mark in the PLC field and then click the Load Profile from myCNC Server button. Reload the application, and all the PLC procedures should be reverted to their default state.

Image

2) You can also update the PLC procedures manually if the computer to which your machine is connected does not have internet access. In order to do so, download the archive at the following link: https://www.pv-automation.com/downloads ... ast.tar.gz

Note that this archive is for the X1366V profile only, so if you are using a different profile you can download the correct version from our Downloads page. After downloading the archive, you can unzip it using your program of choice and then you can manually copy and paste the PLC folder from the archive into your profile folder (home/.config/myCNC/profiles/X1366V on Ubuntu machines), replacing all existing PLC procedures with their default versions.

I would also recommend updating your application to the latest version to prevent this bug from occuring again.

Instructions on how to update the profile (similar to the ones described above) can also be found here: http://docs.pv-automation.com/mycnc/update_profile

Instructions on updating the myCNC application itself: http://docs.pv-automation.com/mycnc/update_mycnc

Let me know if that helps.

Stefan
Posts: 15
Joined: Wed Oct 16, 2019 11:22 am

Re: M6 with air cilinders

Post by Stefan »

I updated PLC and M62 run fine and g-code goes to the end. Now when run a g-code somehow one of the open collectors output related with M7 is ON. This is not a problem for me because I don't use it, but it's strange. why ? I don't have any Header in DXF Settings or any Aliases !?

The problem is M6 for air cilinders does the same as old(default) M6. Relay is ON at the beginning of the g-code and all G0 movement are performed with tool DOWN, tangentional rotation also.
To describe what I'm looking for, here is a simple g-code for one tool tangent knife ( #7005 is already 1)

G0 X259.807621 Y0.000000
M62P0
G1 X0.000000 Y450.000000 F7000.0
M63P0 (relay is OFF because tangent lift and C-rotation)
M62P0
G1 X519.615242 Y450.000000 F7000.0
M63P0 (again...)
M62P0
G1 X259.807621 Y0.000000 F7000.0
M63P0
G0 X0Y0
M02

If there are second tool (another layer in dxf file) M62P1 will be used, but probably will need some kind of M6 because tool offset and tangent support.
At the picture is my machine and tools position.
IMG.jpg
Hope I was clear with my description.

ivan
Posts: 360
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: M6 with air cilinders

Post by ivan »

From what I understand, you need all of your vertical z-axis movement tied to the relays being switched ON and OFF. Unfortunately, this is not yet possible to implement through the existing macros from within the software. We will be working on implementing such a system in myCNC during the upcoming days, and should have something before the end of the week. Stay tuned!

hoangnhatng
Posts: 13
Joined: Fri Oct 25, 2019 2:11 pm

Re: M6 with air cilinders

Post by hoangnhatng »

Well, my systems seem like that. I have a system with 3 head tool : Plasma, Flame torch and plate maker. All of them stay on Z-axis and I also using air cilinders. I using them for 3 situations : Plasma cutting combined with plate maker , Gas cutting combined with plate maker, and Gas cutting using Plasma for make a pierce hole ( to decrease the pierce time by Gas ). So maybe i need to wait you for the new feature? Or Do you have any solution for me?

ivan
Posts: 360
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: M6 with air cilinders

Post by ivan »

Hi there!

From what I understand, your system is different from the one described by Stefan since you are not using a tangential knife setup. The difference is that a tangential knife system typically imports two-dimensional DXF files into myCNC, which then has to add vertical movement (to raise/lower the knife before and after cutting, at corners during the rotation process, etc). In this way, it is different from simply importing G-code since myCNC system does the additional work to ensure that the 2D DXF file is converted into a 3D path.

This conversion typically works well, however some edge cases like using full pneumatics instead of having a Z-axis motor to rely on are not yet supported. For example, here are two videos from a client of ours who is using a motor for the Z-axis (to which all his tools are attached to) in addition to a a pneumatic mechanism:


youtu.be/RK--JTYSl54


youtu.be/FpaTOUoJ5dI

The difference is that the only time the pneumatic mechanism is used in those videos (and, I am assuming, that is how it will be used on your machine) is during tool change. If that is the case, you can simply use the M6 tool change macro, with minor code corrections as described in this thread by me previously - vertical movement for each particular tool is taken care of by the Z-axis motor. In Stefan's case, all of his vertical movement relies on pneumatics, which is not yet implemented in the DXF import function. It is not a terribly hard fix, but unfortunately we've had an extremely hectic week and did not yet manage to finish implementing this feature.

@Stefan - it is also possible to use some sort of a CAM software which will add the necessary G-code commands for the tool lift. Alternatively, we will be trying to finish the DXF import feature in the upcoming days.

Post Reply