Author Topic: AHMI connect to Omron CP1E using USB cable?  (Read 4278 times)

honeydrop

  • Newbie
  • *
  • Posts: 12
    • View Profile
AHMI connect to Omron CP1E using USB cable?
« on: November 11, 2016, 03:23:46 AM »
Hi anyone,
please help me to connect AHMI to Omron PLC CP1E-NA20DR-A using USB cable.
i have tried with AHMI's driver OmronSerialHostLinkCom1 but it doesn't work.

my project is simple, the momentary pushbutton on AHMI will turn "physical lamp" ON and display it's status back to AHMI.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #1 on: November 11, 2016, 07:24:24 AM »
To my knowledge it is not possible to use the USB port because it does not map to a COM port. You will need either the RS232 or Ethernet plug in module.

honeydrop

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #2 on: November 16, 2016, 09:23:18 PM »
thanks Archie :), hope someday AHMI will have driver support to USB connection

bachphi

  • Hero Member
  • *****
  • Posts: 671
    • View Profile
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #3 on: November 16, 2016, 10:11:31 PM »
No honey, I hope someday you will drop the USB PLC and buy a better one with Ethernet. :=)
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

BLUDOTT

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #4 on: November 21, 2016, 12:23:08 AM »
i have usb and ethernet and trust me usb is alot faster

honeydrop

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #5 on: November 21, 2016, 03:08:28 AM »
now i'm trying to connect using built in RS232 through USB to Serial converter cable. i'm using OmronSerialFINSCom1 driver.

it works, i can write PLC's works bit (W.00-W0.04), but i can not read output coils (100.00-100.04) and analog input register (90)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #6 on: November 21, 2016, 10:24:43 AM »
now i'm trying to connect using built in RS232 through USB to Serial converter cable. i'm using OmronSerialFINSCom1 driver.

it works, i can write PLC's works bit (W.00-W0.04), but i can not read output coils (100.00-100.04) and analog input register (90)
I will test this today with the RS232 driver, but last week I deployed a few applications with the Ethernet driver that were reading/writing the IO addresses without any problems.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #7 on: November 21, 2016, 04:55:37 PM »
I did some testing with the serial FINS driver and it would not work at all for me. There is a patch 5 that corrects the problem.:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/Patches

- Download and extract Patch 5 V399r
- Copy the extracted file to AdvancedHMIDrivers\Support and replace the existing file
- Rebuild the solution

Try again to see if you still have the problem.

honeydrop

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #8 on: November 21, 2016, 10:59:55 PM »
I did some testing with the serial FINS driver and it would not work at all for me. There is a patch 5 that corrects the problem.:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/Patches

- Download and extract Patch 5 V399r
- Copy the extracted file to AdvancedHMIDrivers\Support and replace the existing file
- Rebuild the solution

Try again to see if you still have the problem.

wonderful! you've solved my problem Archie, thank you, now i can read output coils, input registers and write output register.

so i continued my project and found this fact: can not write directly to output coils (100.00-100.04), i'm wondering if Omron PLC doesn't allow it naturally, is it true ?
« Last Edit: November 22, 2016, 10:52:36 AM by honeydrop »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #9 on: November 22, 2016, 07:24:21 PM »
I did a quick test using BasicLabel with 500.0 in both PLCAddressValue and PLCAddressKeypad

Is you 100.0 controlling an output? If so, are you using it in your PLC program?

honeydrop

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #10 on: November 22, 2016, 10:26:31 PM »
in my PLC 100.00 is output coil, i controlled it with W0.00 as input to 100.00, is it possible to control 100.00 directly from MomentaryButton(PLCAddressValue=100.00) ?
here i give attachment of my ladder program.
 
but this is just my opinion:
i think PLC doesn't allow direct access to output coils because it will cause unconsistency in ladder program as output coils always need input (just like in my ladder program).

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #11 on: November 22, 2016, 10:46:07 PM »
You should be able to control 100.00 directly, but you will need to remove it from your ladder program. Otherwise the HMI will set the value, but the ladder program will immediately overwrite it.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #12 on: November 22, 2016, 10:52:21 PM »
If you take a look at the picture in this post:

http://advancedhmi.com/forum/index.php?topic=1501.msg8021#msg8021

it shows both direct and indirect control of the outputs (the logic should be applicable for your PLC as well).

honeydrop

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: AHMI connect to Omron CP1E using USB cable?
« Reply #13 on: November 23, 2016, 05:07:22 AM »
You should be able to control 100.00 directly, but you will need to remove it from your ladder program. Otherwise the HMI will set the value, but the ladder program will immediately overwrite it.

Ok thanks Archie for your help and support, i really appreciate your work on AHMI.

If you take a look at the picture in this post:

http://advancedhmi.com/forum/index.php?topic=1501.msg8021#msg8021

it shows both direct and indirect control of the outputs (the logic should be applicable for your PLC as well).

thanks Godra
« Last Edit: November 23, 2016, 08:55:18 AM by honeydrop »