News:

  • September 29, 2026, 02:17:06 PM

Login with username, password and session length

Author Topic: Setting IP using SETUPIP on BX-P-ECOMEX  (Read 11244 times)

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Setting IP using SETUPIP on BX-P-ECOMEX
« on: February 01, 2024, 11:44:38 AM »
I'm trying to set the IP of a BX-P-ECOMEX POM using the SETUPIP instruction, but every time that instruction runs my PLC reboots. I briefly get an error that says

"An operation was attempted that is illegal in current mode or configuration...in SETUPIP at Set POM IP@2."

And the specific ERR shows as

"ERR: panic @008ED8E4: exit_hook|"

Any thoughts on what I'm doing wrong here? I can successfully set the IP of a BX-P-ECOMLT just fine.

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: Setting IP using SETUPIP on BX-P-ECOMEX
« Reply #1 on: February 01, 2024, 11:45:48 AM »
I should add that the IP of the built-in ethernet port is 172.20.99.42 with a 255.255.254.0 subnet.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Setting IP using SETUPIP on BX-P-ECOMEX
« Reply #2 on: February 01, 2024, 11:47:29 AM »
Well that ain't good.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: Setting IP using SETUPIP on BX-P-ECOMEX
« Reply #3 on: February 01, 2024, 11:50:56 AM »
And I just figured it out... turns out I'm an idiot  ::)

I had copied this instruction from a different program (just being lazy) and then neglected to update or even notice that upon both error or success the instruction jumped back to the same stage that holds the instruction. Now that I don't have it trying to perform an infinite loop all is well.

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: Setting IP using SETUPIP on BX-P-ECOMEX
« Reply #4 on: February 01, 2024, 11:52:29 AM »
Well that ain't good.
Not ideal anyway ;)

I was really thrown by the "panic" error, but now that I realize what I did that error from the CPU makes perfect sense.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Setting IP using SETUPIP on BX-P-ECOMEX
« Reply #5 on: February 01, 2024, 02:12:57 PM »
Well that ain't good.
Not ideal anyway ;)

I was really thrown by the "panic" error, but now that I realize what I did that error from the CPU makes perfect sense.

I would prefer that we handle it more gracefully, but SETUPIP triggers some pretty critical things. If that got reentrant not much good will come from that. The 'panic' is a handler in the TCP/IP stack that gets invoked when things have gone very wrong, and apparently firing that off a second (or third, or fourth, etc) time got the stack out of shape.

Sorry for the trouble.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MarkTTU

  • Hero Member
  • *****
  • Posts: 293
    • SamJackson.com
Re: Setting IP using SETUPIP on BX-P-ECOMEX
« Reply #6 on: February 01, 2024, 03:29:07 PM »
Well that ain't good.
Not ideal anyway ;)

I was really thrown by the "panic" error, but now that I realize what I did that error from the CPU makes perfect sense.

I would prefer that we handle it more gracefully, but SETUPIP triggers some pretty critical things. If that got reentrant not much good will come from that. The 'panic' is a handler in the TCP/IP stack that gets invoked when things have gone very wrong, and apparently firing that off a second (or third, or fourth, etc) time got the stack out of shape.

Sorry for the trouble.

No trouble at all. I've spent way more time chasing my own idiocy on this project than would warrant getting upset at the 15 minutes I spent beating my head against my desk on this one ;)