News:

  • April 18, 2024, 03:06:51 PM

Login with username, password and session length

Author Topic: Example: Emulate DirectSOFT/DirectLOGIC ECIPSUP - ECOM100 IP Setup IBox  (Read 3633 times)

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
If you have an ECOM100 module in your Do-more PLC system, and you wish to programmatically configure its IP Settings (IP Address, Gateway Address, Subnet Mask), there is no native instruction to do this.  However, the equivalent expanded IBox logic from DirectSOFT can easily be implemented in a Do-more!

The attached project has a code-block called ECSetupIP that utilizes stages to sequence through the necessary steps involved.

ECSetupIP Input Parameters:
  • D100 contains the IP Address
  • D101 contains the Gateway Address
  • D102 contains the Subnet Mask

ECSetupIP Output Parameters:
  • C100 Success Bit
  • C101 Error Bit
  • DLV42 Error Code (will be 0 on success; see the DirectLOGIC ECSETUP IBox documentation for error code information)

ECSetupIP Internal Variables:
  • V100 - V143 as the Message Buffer
  • @ECOM_000 device (tweak this for YOUR installation)

$Main has an X0 contact to drive a RUN ECSetupIP box.

Just unzip the attached .ZIP file.  It contains the ECSetupIPEmulation.dmd project file, which will work with any Designer version 1.3 or later.

EDIT: One caveat - if you need to change the DL42 Error Code output parameter address to a different DLV address, you also need to tweak the To DL V42 parameter in the DLWX instruction at rung #4 to the corresponding DLV address (e.g. if you change all the DLV42's to DLV100, then you need to also change the To DL parameter in the DLWX instruction to V100).

EDIT2: Second caveat - remember to turn ON dipswitch 7 in your ECOM100 module (NOT the CPU) to ENABLE IBOX functionality in that ECOM100.

As with all examples, this is for educational purposes only and the user assumes all responsibility for its use.
« Last Edit: October 07, 2015, 12:08:14 PM by franji1 »

MarkTTU

  • Hero Member
  • *****
  • Posts: 276
    • SamJackson.com
Re: Example: Emulate DirectSOFT/DirectLOGIC ECIPSUP - ECOM100 IP Setup IBox
« Reply #1 on: October 06, 2015, 12:56:42 PM »
Super helpful! Thanks!

How hard would the write Module ID command be?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
Re: Example: Emulate DirectSOFT/DirectLOGIC ECIPSUP - ECOM100 IP Setup IBox
« Reply #2 on: October 06, 2015, 01:29:30 PM »
Super helpful! Thanks!
You are welcome!

Quote
How hard would the write Module ID command be?
Not hard.  Very similar.  Will post that one soon as a different example.