News:

  • June 30, 2026, 04:09:31 AM

Login with username, password and session length

Author Topic: Miscellaneous Do-More Questions  (Read 55317 times)

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Miscellaneous Do-More Questions
« Reply #15 on: February 09, 2015, 12:32:14 PM »
Like this: "D[D[V0] + D[V1]] = Expression"
This would be very cool.  8)
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Miscellaneous Do-More Questions
« Reply #16 on: February 09, 2015, 02:27:59 PM »
Like this: "D[D[V0] + D[V1]] = Expression"
This would be very cool.  8)

Even more rope!!! Yes? ;)
"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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Miscellaneous Do-More Questions
« Reply #17 on: February 09, 2015, 05:13:26 PM »
After some study, it will support this too: "Struct[Exp].Field = Exp", or "Block[Exp]:Cast = Exp".

The DmD side will take a bit of time...but once I figured out how to do it...the controller literally took *5 minutes*. :bows head in shame:
"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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3619
  • Darth Ladder
Re: Miscellaneous Do-More Questions
« Reply #18 on: February 09, 2015, 06:59:43 PM »
Everything is do-able, the question is ROI. I have spent a bit of time thinking about this though, and I know how to do it pretty easily in the PLC. Whether I can talk Franj into the the Designer side work remains to be seen.

Cool! Woo hoo!  (If you can talk Franj into it, that is!)    8)
« Last Edit: February 09, 2015, 08:18:02 PM by Controls Guy »
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Miscellaneous Do-More Questions
« Reply #19 on: February 09, 2015, 07:11:52 PM »
All of the pieces already exist, just have to assemble them. Franj is pretty reasonable in cases like that. ;)
"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

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Miscellaneous Do-More Questions
« Reply #20 on: February 09, 2015, 07:41:46 PM »
Cool beans!
Sometimes the value/expression is the simple part; where to put it is the hard part. Once you get Franj on board, we'll be set ;D ...what does he really like?
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3833
    • Host Engineering
Re: Miscellaneous Do-More Questions
« Reply #21 on: February 09, 2015, 07:55:57 PM »
I think the "hard" part is going to be changing the "Result" parameter from a simple element type to a "blob",
e.g. from an element like D42 to an ASCII expression "D[N5*10 + MAX(V3, 9) + 0x4)]:R",
and handling old projects that do NOT have the "blob" parameter.  It's not hard, just gotta think it through.

It doesn't have to be backward compatible (i.e. Designer 1.0, 1.1, 1.2, and 1.3 cannot open 1.4 project files, but 1.4 must open 1.0, 1.1, 1.2, and 1.3 projects), so that's why it should not be that hard.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3619
  • Darth Ladder
Re: Miscellaneous Do-More Questions
« Reply #22 on: February 09, 2015, 08:06:23 PM »
Even more rope!!! Yes? ;)

I'm planning on opening a rope emporium.  I'll take all you got!   :D
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3619
  • Darth Ladder
Re: Miscellaneous Do-More Questions
« Reply #23 on: February 09, 2015, 08:14:15 PM »
After some study, it will support this too: "Struct[Exp].Field = Exp", or "Block[Exp]:Cast = Exp".

The coolness is almost too much to bear!   :)

Quote
The DmD side will take a bit of time...but once I figured out how to do it...the controller literally took *5 minutes*. :bows head in shame:

That's a sign of previous good design!  I made a functionally fairly major improvement to a DM app the other day, and it took about an hour.  The change was significant enough that the customer assumed it would take days if not a week or more.
« Last Edit: February 09, 2015, 08:18:41 PM by Controls Guy »
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3619
  • Darth Ladder
Re: Miscellaneous Do-More Questions
« Reply #24 on: February 13, 2015, 10:30:11 PM »
I exported logic from two versions of a program to difference them with an external program.  They're two forks of the same original program.  I notice in one version only, extra NOPs after a program exit that don't show in the alternate version.  On screen of course, there are nothing but NOPs after the EXIT.  Why would one get exported in one program version but not the other?  Puzzling.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Miscellaneous Do-More Questions
« Reply #25 on: February 14, 2015, 01:34:04 AM »
We keep an extra NOP at the end of each code block as an insert point, or some such thing...I barely remember, and it turns out that the management of said NOP is not...um...optimally consistent. I think there might have been some effort to fix it a bunch of years ago, but it proved harder than one would expect, so we left it. It's mostly harmless... ::)
"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

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3833
    • Host Engineering
Re: Miscellaneous Do-More Questions
« Reply #26 on: February 14, 2015, 02:12:41 PM »
I exported logic from two versions of a program to difference them with an external program.  They're two forks of the same original program.  I notice in one version only, extra NOPs after a program exit that don't show in the alternate version.  On screen of course, there are nothing but NOPs after the EXIT.  Why would one get exported in one program version but not the other?  Puzzling.
There is no extra NOP in the PLC's code-blocks, but there are in your project in Designer.

Also, if you ever cursor beyond the bottom of your program and begin editing, that will add another extra NOP.  But all of this is at the Designer level.  It's just "pad" to allow you to cursor beyond the last instruction in your program.

Adding new stuff beyond the end of existing logic needs to "just work", hence why the NOPs beyond the end "just show up".  This is just on the Designer side.  Trailing NOPs are never downloaded to the PLC.  Although it appears as though every code-block is "filled with NOPs", that is just a façade to make it easy to add logic sequentially, which is how most logic is written.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3619
  • Darth Ladder
Re: Miscellaneous Do-More Questions
« Reply #27 on: February 14, 2015, 02:40:18 PM »
That all makes sense, and it wouldn't even bother me if an extra NOP or two were downloaded to the PLC.  My question was the inconsistency, as well as it creating apparent differences when comparing, making real differences hard to find in show-only-differences mode or when skipping difference to difference.  Not a big deal unless it does that a lot, creating a lot of clutter.

IIRC, I believe I've seen similar behavior in the internal DMD compare (telling me there's a difference, but when I go look, I can't see any).  Perhaps that stems from the same issue.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3619
  • Darth Ladder
Re: Miscellaneous Do-More Questions
« Reply #28 on: February 14, 2015, 02:43:46 PM »
There is no extra NOP in the PLC's code-blocks, but there are in your project in Designer.

Does that imply that I can manually fix it (for easier compares) by deleting the rung where the extra, explicit NOP is?  Won't make any difference on screen of course, but would that then synch the exported files?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3833
    • Host Engineering
Re: Miscellaneous Do-More Questions
« Reply #29 on: February 14, 2015, 04:37:22 PM »
I misunderstood.  The issue is with Exported .TXT files?  Those are not guaranteed to match the source project code exactly.  In addition to the extra NOPs, there are hidden parameters called Edge Bits and Instruction IDs that will also be different.

Can you describe the situation(s) you are dealing with?