how to make my own custom page for qtdragon_hd?

More
3 years 6 months ago #270283 by rodw
Final files for reference.
I've also included my scalebelts component
The ratios in the array we're calculated by measuring the max  RPM for each gear and calculating the ratio
Rough and ready but it does the job.

The speed_fb_out pin needs to be connected to spindle.0.speed_in.

Please Log in to join the conversation.

More
3 years 6 months ago #270284 by cmorley
Thanks for sticking it through. Just the tester I needed! Now I just need to document the fixes :)

Please Log in to join the conversation.

More
3 years 6 months ago #270285 by rodw

Glad u got it sorted.
When u got the panel just the way you like, I'd like to add it to the builtin panels - seems pretty useful.
Great minds think alike! 
I just uploaded it with myscalebelts component. The component needs a bit of cleanup to be more generic with personalities and parameters instead of hard code.

One thing that would be nice on the main window would if the modbus error field was styled with a red background if not connected and green if connected. This would be based on the same outpuut pin from the VFD as the green LED on my panel

This would just give a nice visual queue everything is working without going to the panel...

Please Log in to join the conversation.

More
3 years 6 months ago #270286 by rodw
Bit like this

 

Attachment not found

Please Log in to join the conversation.

More
3 years 6 months ago #270290 by rodw
I put some documentation together in Google Drive. Feel free to use any content there.
I'll get some better screen dumps with the fields populated on a live screen on a machine so the fields are populated.
From memory I think it's possible to save Google docs to asciidoc format. Pretty sure Phil knows how. Enjoy

docs.google.com/document/d/1CR6USUoD0hqj...j8M/edit?usp=sharing

Please Log in to join the conversation.

More
3 years 5 months ago #270552 by rodw
I thought it might be good to add some missing features compared with axis. For example, buttons to turn coolant and mist on and off
 

Attachment not found



I added the buttons and a callback in the hamdler which is all working.
But I don't know how to call a NML command  via the python interface.
I am assuming that the linuxcnc object  is loaded somewhere in qtdragon. 
So how do I call something like:
Code:
c.mist(linuxcnc.MIST_ON)
Here is the callback
Code:
    def coolantSelected(self, number):         coolant = number         if (coolant == 0):             # turn off mist and coolant             #c.mist(linuxcnc.MIST_OFF)             #c.flood(linuxcnc.FLOOD_OFF)             print("mist and coolant off")         elif (coolant == 1):             #turn on mist             #c.mist(linuxcnc.MIST_ON)             print("mist on")         elif (coolant == 2):             #turn on flood             #c.flood(linuxcnc.FLOOD_ON)             print("flood on")

The other feature which appears missing (Unless I have not configured things properly) is incrementing spindle speed like you can do in axis.
How do we do that?

Please Log in to join the conversation.

More
3 years 5 months ago #270553 by rodw
Ahh, finally saw the coolant buttons. But how do we change spindle speed?
Just need to know how to use the python interface. Never used it before.

Please Log in to join the conversation.

More
3 years 5 months ago #270561 by cmorley
I would suggest usig the ACTION library:
linuxcnc.org/docs/2.9/html/gui/qtvcp-lib...ml#_code_action_code

look here for a style sheet way to modify the spindle buttons to incrementally adjust the spindle.

Please Log in to join the conversation.

More
3 years 5 months ago #270564 by rodw
Chris, thanks,
Do I have to instantiate the ACTION library in my handler?

Look where for the style sheets?

Please Log in to join the conversation.

More
3 years 5 months ago #270579 by cmorley
Yes you must import and instantiate ACTION in the handler file.

Press f12 when qrdragon is running for the style sheet editor

Please Log in to join the conversation.

Time to create page: 0.276 seconds
Powered by Kunena Forum