WHB04B-4 Pendant Plugin

This is where you talk about Plugins. How they are made and how they work, show examples.

Re: WHB04B-4 Pendant Plugin

Postby formantjim » Thu Mar 26, 2020 5:07 pm

Another additional information the Fn W-Home works.
formantjim
 
Posts: 10
Joined: Fri May 31, 2019 5:28 pm

Re: WHB04B-4 Pendant Plugin

Postby shad » Thu Mar 26, 2020 8:20 pm

Please notice, that "Continious" button sets the jog mode to continous.
"Step" button switch between: continous jog mode - single step jog mode - multi step jog mode for the MPG
Also Pendant plugin window can't be closed, just hide window using "Minimize" button on the plugin form.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 300
Joined: Thu Sep 15, 2016 5:23 pm

Re: WHB04B-4 Pendant Plugin

Postby cncdrive » Thu Mar 26, 2020 10:44 pm

Andrew,

I guess the Form is not closable because the USB HID has to be attached to the Form, right?
What if you override the close function of the Form and do a Form.Hide(); function.
Then in the Show event you can check if the Form is hidden and then use a Form.Show(); function to show it again.
This way you could imitate as if the Form is closed...
cncdrive
Site Admin
 
Posts: 3233
Joined: Tue Aug 12, 2014 11:17 pm

Re: WHB04B-4 Pendant Plugin

Postby cncdrive » Thu Mar 26, 2020 10:58 pm

formantjim wrote:I just came across this post as I have just added a laser to my CNC machine. I had been using Mach 3 with ESS and kept having so many errors with the ESS that I switched to UC 300ETH and it has been fantastic for milling. But now with the laser the Mach 3 post processors for Inventor CAM that I use are poor to say the least so I ran into the issue that using Mach 3 with the UC 300ETH is not a good combination. So I decided to give UCCNC a try but found that it did not have support for either my Huanyang VFD with modbus or the wireless pendant WHB04B-4 so left it well alone till your posting of the latest plugin. I too did not want to go and buy a new one so with great hopes I rushed to my machine loaded up UCCNC and installed your plugin but alas it does connect and show the coordinates correctly on the Pendant and on the DRO's of UCCNC but no movement or any further commands are enabled or controlled. The plugin once set to both call and enable just causes the Pendant window to open it says its found it but then hangs and I have to reboot UCCNC to get rid of the pop up window.
I'm running Windows 10 not connected to the internet or anything totally stand alone also UCCNC version 1.2111 the previous Mach 3 UC300ETH setup has been running flawlessly for 2 years. This would be my ultimate dream to have this working because I have also since found another potential plugin for the VFD so I could make the switch to UCCNC permanent.

Any guidelines or help you can give me to get this running would be much appreciated.


UCCNC has a modbus plugin which can drive any VFDs, but you require to code the data sending etc. yourself.
UCCNC also has a modbusEZ plugin written by one of the members of the forum, that supports the Huanyang VFD and many other VFD models also.

I'm not sure what issues you ran into with mach3 + UC300ETH, you did not explain it. But remember that the UC300ETH is only a motion controller, it does not interpret the g-code, it just executes what mach3 says to do. So, if this combination does not work well for you then it is not a Inventor CAM to UC300ETH related, but Inventor to Mach3 related issue. In other words if those g-codes generated by you CAM does not work well with Mach3 + UC300ETH then it would not work well also with any other motion controllers + Mach3 and it would also not work well with UCCNC + UC300ETH, because the UCCNC understands the same g-code standard as what Mach3 understands.
cncdrive
Site Admin
 
Posts: 3233
Joined: Tue Aug 12, 2014 11:17 pm

Re: WHB04B-4 Pendant Plugin

Postby eabrust » Thu Mar 26, 2020 11:13 pm

I had the same issues with my XBox plugin (couldn't close form or plugin would not remain working). I implemented using a 'notify icon' in the system tray with a menu from the tray icon to bring the plugin back from 'hidden / minimized' I also throw a message box on close to allow user to choose between minimize or a true 'close' event.

Here is my closing code (not saying it is right way, but it works for me :) ):
Code: Select all

  private void PluginForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            //Do not close the form when the red X button is pressed
            //But start a Thread which will stop the Loop call from the UCCNC
            //to prevent the form closing while there is a GUI update in the Loop event


            if (goingtoclose==false)
            {
                res = MessageBox.Show("OK to close, Cancel to minimize to taskbar.", "Close?", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            }



            if (res == DialogResult.Cancel)
            {
                //if (e.CloseReason == CloseReason.UserClosing)
                e.Cancel = true;
                this.WindowState = FormWindowState.Minimized;

                // MessageBox.Show("You have clicked Cancel Button");
                //Some task… 
            }
                       
            else //if (res == DialogResult.OK)
            {

                if (!mustclose)
                {
                    e.Cancel = true;
                    Thread closethr = new Thread(new ThreadStart(Closeform));
                    closethr.Start();
                    goingtoclose = true;
                }
                else
                {
                    //Form is closing here...
                }
                //MessageBox.Show("You have clicked Ok Button");
                //Some task… 
            }





        }

        public void Closeform()
        {

           

            //Stop the Loop event to update the GUI

            Pluginmain.loopstop = true;
            //Wait until the loop exited
            while (Pluginmain.loopworking)
            {
                Thread.Sleep(10);
            }
            //Set the mustclose variable to true and call the .Close() function to close the Form
            mustclose = true;
            //this.Hide();
            this.Close();
           
        }






to make it 'hide' on a minimize to the tray, add a form resize event.

Code: Select all
        private void PluginForm_Resize(object sender, EventArgs e)
        {

            if (this.WindowState == FormWindowState.Minimized)
            {
                NotifyIcon1.Visible = true;
                this.Hide();
            }
        }


and to bring back from hiding via tray icon menu

Code: Select all
  private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.Show();
            this.WindowState = FormWindowState.Normal;
            this.ShowInTaskbar = true;
        }


I think that is the bulk of it, hope it helps

regards
Eric
eabrust
 
Posts: 143
Joined: Fri Sep 16, 2016 2:32 am

Re: WHB04B-4 Pendant Plugin

Postby shad » Fri Mar 27, 2020 2:54 pm

Thanks to all!
Yes, Balazs, USB attaching to the plugin form. Thank you for your help. Last time the problem was in the Int32 pointer size - in 32 bit and 64 bit it's different.

Now the plugin window is available by clicking on the icon in the task bar and hiding on the UCCNC startup.
Please check it.
Attachments
WHB04B-4 Pendant.rar
(173.98 KiB) Downloaded 9 times
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 300
Joined: Thu Sep 15, 2016 5:23 pm

Re: WHB04B-4 Pendant Plugin

Postby formantjim » Sat Mar 28, 2020 10:51 pm

I have just tried that last file for the pendant and it does not work at all no communication with the pendant whatsoever. The previous one works partially as I previously described.

Keep on trying please you are my last hope before I go out and have to buy another pendant.

I really appreciate all your efforts.
formantjim
 
Posts: 10
Joined: Fri May 31, 2019 5:28 pm

Re: WHB04B-4 Pendant Plugin

Postby Robertspark » Sun Mar 29, 2020 5:55 pm

Do you have the 4 or 6 axis mpg?

Do you have the wired or wireless mpg?

All of these are not likely to use the same plugin because of the PID being different I expect. It may be worth while you checking and listing your VID and PIE for the usb device as they may be different to what the plugin was created for to slow Andrew to check out the potential problems
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2110, Neuron Lite
UCCNC v1.2110 Macro Manual
Robertspark
 
Posts: 1560
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: WHB04B-4 Pendant Plugin

Postby formantjim » Mon Mar 30, 2020 1:39 am

Hi Robertspark thanks for jumping in here.

The pendant in question is 4 Axis and Wireless. As I said earlier part of it works like in step mode but in continuous there is no axis movement when the wheel is tuned on the pendant. It does communicate bidirectionally and reports the correct readings on the DRO's.

Attached are the details of the VID hope this pinpoints the issue.'

Capture 4.JPG

Capture.JPG
formantjim
 
Posts: 10
Joined: Fri May 31, 2019 5:28 pm

Re: WHB04B-4 Pendant Plugin

Postby shad » Mon Mar 30, 2020 6:51 pm

Has anyone besides formantjim tested the plugin?? Any feedback will be fine:)
About usb - this MPG has a :
ProductId = 60307;
VendorId = 4302;
Try attaching program for checking
Starnge, but on all my PC's it's working fine.
Attachments
usbview.rar
(32.09 KiB) Downloaded 3 times
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 300
Joined: Thu Sep 15, 2016 5:23 pm

PreviousNext

Return to Plugins

Who is online

Users browsing this forum: No registered users and 1 guest