AdvancedHMI Software

General Category => Support Questions => Topic started by: honeydrop on November 11, 2016, 03:23:46 AM

Title: AHMI connect to Omron CP1E using USB cable?
Post by: honeydrop 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.
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: Archie 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.
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: honeydrop on November 16, 2016, 09:23:18 PM
thanks Archie :), hope someday AHMI will have driver support to USB connection
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: bachphi 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. :=)
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: BLUDOTT on November 21, 2016, 12:23:08 AM
i have usb and ethernet and trust me usb is alot faster
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: honeydrop 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)
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: Archie 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.
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: Archie 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.
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: honeydrop 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 ?
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: Archie 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?
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: honeydrop 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).
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: Archie 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.
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: Godra 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).
Title: Re: AHMI connect to Omron CP1E using USB cable?
Post by: honeydrop 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