LaserWeb / lw.comm-server

Unified communications server for LaserWeb4 (and other frontends)
GNU General Public License v3.0
38 stars 46 forks source link

Detect if its a laser or a mill? #31

Open ghost opened 7 years ago

ghost commented 7 years ago

Run http://smoothieware.org/console-commands#config-get for the laser_module parameter (if true, its a laser) also could probably check for extruders if found, is a 3d Printer. Check for a Spindle config, its a mill... etc

On Grbl we can check for Laser Mode (if found its a laser. If not its a mill)

Then in the frontend (@jorgerobles) we can hide laser ops and "laser test" etc and any other instance of "laser" if its not a laser

tbfleming commented 7 years ago

This sounds good for limiting what's on the Control tab. I'm uneasy with it limiting things on the Files tab.

ghost commented 7 years ago

If i may ask? Why? We have a cnc mode switch that hides cnc mill ops (;

On Jun 1, 2017 8:48 PM, "Todd Fleming" notifications@github.com wrote:

This sounds good for limiting what's on the Control tab. I'm uneasy with it limiting things on the Files tab.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/31#issuecomment-305584918, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr21fOtX3lhnHI97Sd8V3evL3A_ZkLks5r_wd9gaJpZM4NtYFj .

ghost commented 7 years ago

Sidenote: it could be true on all 3 of course too

On Jun 1, 2017 8:50 PM, "Peter van der Walt (Gmail)" < peter.plaaswerf@gmail.com> wrote:

If i may ask? Why? We have a cnc mode switch that hides cnc mill ops (;

On Jun 1, 2017 8:48 PM, "Todd Fleming" notifications@github.com wrote:

This sounds good for limiting what's on the Control tab. I'm uneasy with it limiting things on the Files tab.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/31#issuecomment-305584918, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr21fOtX3lhnHI97Sd8V3evL3A_ZkLks5r_wd9gaJpZM4NtYFj .

tbfleming commented 7 years ago

I hate that switch. It contributes to people coming from jscut thinking it's not a complete replacement. They try it, see only laser ops, then quickly give up.

ghost commented 7 years ago

Yip me too, sort of why I want the switch replaced with "what is this machine based on what the firmware tells us"?

ghost commented 7 years ago

Also, want to remove the phrase Laser wherever not absolutely needed - since it scares of mills users seeing a Laser test button, laserweb title bar, etc

jorgerobles commented 7 years ago

I will ditch da switch. Was only because LW3 had.

tbfleming commented 7 years ago

I see this happening:

ghost commented 7 years ago

Agreed, quick win there. In default mode we can show all machine ops. After connecting, we know what we are talking to, hide irrelevent ops?

ghost commented 7 years ago

Yeah ok, i hear you (; Then default to show everything all the time on CAM

ghost commented 7 years ago

I'll leave my root problem - just in case it inspires a different elegant solution to the problem:

I have several machines in my shop: would be cool if LW adapts to the particular machine I connected to, when I connect to it. On the one hand I thought, simple enough, check the firmware to see what tools are configured. The other idea I had was to find a hash / serial number / something from the serial port, and automatically switch Machine Profiles based on the ID of the port you connect to (and no port name is not good enough, /dev/ttyUSB0 isnt always the mill (; ) - this idea of course would be even better since it can then adapt machine sizes, origins, gcode etc all based on which machine i am presently connected to)

jorgerobles commented 7 years ago

Understood. I think machine should connect on user interaction, and once connected, there's a work in progress https://github.com/LaserWeb/lw.comm-server/wiki/Firmware-feature-list that might solve that.

cojarbi commented 7 years ago

I have the same issue as Peter, but what happens if I want to work in another comouter or not connected? Or shows all ops on not connection, switch to specific when connected

jorgerobles commented 7 years ago

I'd go for change upon user actively chooses the machine to connect.

cprezzi commented 7 years ago

I belief that the user should always initiate the connection because on some machines it's not save to connect without user knowing it (i.e. eleksmaker machine activates laser on connect!).

cprezzi commented 7 years ago

The planned getFeatureList command could be easily extended by featuresLaser, featuresMilling or a "serial number" if I can detect those infos somehow.

What about having a firmware configuration dialog in LW4?

cprezzi commented 7 years ago

If we can detect some machine serial number, we could name that machine and show that name in the COM-Port dropdown.

cprezzi commented 7 years ago

The problem with reading the config (like laser module, spindle module, laser mode...) from the firmware is, that we don't know if the user has configured the firmware correctly.

ghost commented 7 years ago

@cprezzi https://github.com/EmergingTechnologyAdvisors/node-serialport#serial-port-list shows Serial number as a result.

Sidenote, all Smoothieware boards have the same pid and vid. Seeing those immediately allows you to assume that port is a smoothie (;

On Jun 1, 2017 11:22 PM, "Claudio Prezzi" notifications@github.com wrote:

The problem with reading the config (like laser module, spindle module, laser mode...) from the firmware is, that we don't know if the user has configured the firmware correctly.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/31#issuecomment-305624401, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr252WZy3SP3rxpZdyo4iJSD4HglLXks5r_yt5gaJpZM4NtYFj .

cprezzi commented 7 years ago

What do you think about that:

This way, we could store all "flags" in the machine profiles.

cprezzi commented 7 years ago

And the other way around:

jorgerobles commented 7 years ago

I'm not sure. I think machine hardware should have a command to identify their purpose, defined by user. Not so hard ... :)

El 18 jun. 2017 7:40 p. m., "Claudio Prezzi" notifications@github.com escribió:

And the other way around:

  • If the user selects a machine profile, we could try to open the last known port for this machine.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/31#issuecomment-309291624, or mute the thread https://github.com/notifications/unsubscribe-auth/ABoIYMbW6VEf-e7E7ZcX2y3flQ2wVlQwks5sFWEIgaJpZM4NtYFj .

cprezzi commented 7 years ago

On grbl, the user can store an idetification string with $I=xxxxx, but Smoothieware and TinyG don't have such a feature, as far as I know.

cprezzi commented 7 years ago

What I mean is, that we should save all machine dependant settings for the frontend in the machine profiles. If there is some machine idetification or "serial number" we would also store it in the corresponding machine profile, so we know which settings to load.

jorgerobles commented 7 years ago

I agree. Some vendor machines will come with the features preloaded on their profiles, some other belongs to the firm capabilities. Machine profiles are meant for that, but we have to ask the machines - who are you?

El 18 jun. 2017 8:00 p. m., "Claudio Prezzi" notifications@github.com escribió:

What I mean is, that the frontend anyways has to save the settings for his features, so why not in the machine profiles. If there is a machine idetification number (or "serial number") we could store it in the corresponding machine profile, so we know which settings to load.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/31#issuecomment-309292702, or mute the thread https://github.com/notifications/unsubscribe-auth/ABoIYHkJQANnglz7f4SpcgvycksU0QZMks5sFWXSgaJpZM4NtYFj .