Author Topic: Advanced HMI and Click CPU  (Read 4773 times)

BobbyS

  • Newbie
  • *
  • Posts: 9
    • View Profile
Advanced HMI and Click CPU
« on: February 14, 2015, 02:54:54 PM »
Hi, noob here.

I have a Click plc connected to my pc with AutomationDirect usb cable and adapter. I have not been able to get HMI to communicate with my Click. I tried the example with a timer but I get a message above the digital readout that says"cannot connect to plc".

I programmed a simple timer and loaded it into the plc. Made sure it ran ok, then disconnected my programming software from the plc. I then tried the example in the quick start guide but cannot get it to work and do not know why. I gave the timer an address of 345057 in HMI. Is there something more that I am not doing?

Is there a way to know that the HMI is connected before trying to run the example? I am not sure where I am going wrong.

Thanks ahead if anyone can help!


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5272
    • View Profile
    • AdvancedHMI
Re: Advanced HMI and Click CPU
« Reply #1 on: February 14, 2015, 03:17:52 PM »
Try this:

- Add a ModbusRTUCom to your form and set the PortName, BaudRate, DataBits, Partity, and StopBits to exactly what you have in the Click programming software
- Add a BasicLabel to the form
- Set the properties PLCAddressValue and PLCAddressKeypad both to 40001
- Make sure your programming software is completely closed so AdvancedHMI can get access to the com port
- Run the applicatiom
- Click on the BasicLabel and put in a value
- If everything is correct , the BasicLabel should change to the value you entered

BobbyS

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Advanced HMI and Click CPU
« Reply #2 on: February 14, 2015, 03:45:28 PM »
Thank you for the quick response Archie. I will give it a go with your advise. This is such a cool HMI and I know a lot of work is involved. Thanks!

BobbyS

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Advanced HMI and Click CPU
« Reply #3 on: February 14, 2015, 04:43:43 PM »
Alright! Success! That did the trick. The only issue is that win 7 will change my prolificUsb com port when it boots up. The Click software doesn't care if it changes to com5 as long as I set it in the programming software. Is there a way to lock in the com1 setting so HMI will always see it.

When I go to Comport settings, Com1 always says "in use"  but I changed to it anyway.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5272
    • View Profile
    • AdvancedHMI
Re: Advanced HMI and Click CPU
« Reply #4 on: February 14, 2015, 04:49:48 PM »
You may have some internal hardware using that COM1 like a mouse touch pad. I don't know of anyway to lock it in to a particular port.

BobbyS

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Advanced HMI and Click CPU
« Reply #5 on: February 14, 2015, 05:29:14 PM »
OK. Nothing stops working or crashing when I force Com1 to the USB so I will just use it that way.

Also, I am reading registers just fine, but do inputs work the same way? Like a momentary button? I input the address of a contact with a button but it doesn't do anything?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5272
    • View Profile
    • AdvancedHMI
Re: Advanced HMI and Click CPU
« Reply #6 on: February 14, 2015, 06:10:19 PM »
Also, I am reading registers just fine, but do inputs work the same way? Like a momentary button? I input the address of a contact with a button but it doesn't do anything?
Make sure you are not trying to set a bit that is associated to a physical input. Otherwise it will not work because the value of the physical input will always control the bit.

BobbyS

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Advanced HMI and Click CPU
« Reply #7 on: February 14, 2015, 07:28:01 PM »
It is an internal contact address that I am trying to set. I have tried addressing both address fields in the HMI for momentary button as well as either one separately but I cannot get any of them to work. I can see that it is communicating with the plc by the rx-tx lights on the plc. The button doesn't press and no signal is sent. Maybe I have not addressed it right?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5272
    • View Profile
    • AdvancedHMI
Re: Advanced HMI and Click CPU
« Reply #8 on: February 14, 2015, 07:38:03 PM »
What address did you put in PLCAddressClick?

BobbyS

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Advanced HMI and Click CPU
« Reply #9 on: February 14, 2015, 08:25:25 PM »
I used two addresses for two buttons start/stop. 16389 and 16390

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5272
    • View Profile
    • AdvancedHMI
Re: Advanced HMI and Click CPU
« Reply #10 on: February 15, 2015, 08:15:28 AM »
Try 016389

The AdvancedHMI driver uses the first digit to determine which function code to use. a "0" tells it to use function codes 1,5,15

BobbyS

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Advanced HMI and Click CPU
« Reply #11 on: February 15, 2015, 04:33:29 PM »
That did the trick! Works great! Thanks for the program and all the support help.

 I'm trying to get back up to speed with new tech. I haven't been around plc stuff since working with Sy/Max back in the 1980's.