News:

  • June 10, 2026, 07:51:37 AM

Login with username, password and session length

Author Topic: Software friendliness  (Read 73602 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Software friendliness
« Reply #30 on: April 19, 2013, 04:14:41 PM »
Not sure what you mean by 'true structs'. We currently have 25 built-in types that are as true a structure as I know how to create. The only thing that isn't there yet is the ability for the user to create his own types.

Well, and I'm not much of a PC programmer, but my understanding of a "struct" is that it IS a user defined type.  You know, two integers for such-and-such with the following names within the struct (which itself becomes a type that can be freely instantiated), two strings for this, 20 bits for that, and so on.  I say "struct" rather than "class" because it's just a data type and you can't add member functions.
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: 6158
  • Yes Pinky, Do-more will control the world!
Re: Software friendliness
« Reply #31 on: April 19, 2013, 04:32:23 PM »
Well, and I'm not much of a PC programmer, but my understanding of a "struct" is that it IS a user defined type.  You know, two integers for such-and-such with the following names within the struct (which itself becomes a type that can be freely instantiated), two strings for this, 20 bits for that, and so on.  I say "struct" rather than "class" because it's just a data type and you can't add member functions.

A 'structure' is a heterogeneous collection of fields, regardless of whether it is user defined or not. Timers, counters, or PID loop in Do-more are all structures...and can even be created by the user as either arrays (blocks) or as singletons on the heap. The user cannot yet declare his own, but I would not characterize that as not supporting structures.
"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: 3607
  • Darth Ladder
Re: Software friendliness
« Reply #32 on: April 19, 2013, 06:17:46 PM »
Well, I think I said they were partially supported, plus that was the reason I said "struct" rather than "structure".  IIRC, "struct" is the keyword used in C to create a user-defined structure type, so that was specifically the issue I was intending to speak to.

I definitely didn't mean to imply that Do-More was incompatible with structures per se, and apologize if I sounded that way.
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: 6158
  • Yes Pinky, Do-more will control the world!
Re: Software friendliness
« Reply #33 on: April 19, 2013, 10:44:32 PM »
Obviously this is an issue of semantics and I was pretty sure that was the case going in. ;)

In the interest of better understanding terminology, what would you call something like Do-more's PID thingy that contains a collection of fields like Loop.SP, Loop.PV, or Loop.Output, or our Timer thingy that has Timer.Acc or Timer.Done?
« Last Edit: April 19, 2013, 10:46:44 PM by BobO »
"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: 3607
  • Darth Ladder
Re: Software friendliness
« Reply #34 on: April 19, 2013, 10:57:31 PM »
You HAD to ask, didn't you?   ;D  I mean, I do realize that they're structures, but I just don't think about them enough to need a word for them.  I don't believe I've ever used the word "struct" to refer to anything but UDT's (and actually was using it to make the concept easier for PC guys! -- I should stick to automation terms!).  See, I look at internal code like you look at nicknames.  It's a black box.  It works, it's got an accumulator & setpoint, a enable bit, a done bit, and a timing bit.  Beyond that, don't care unless and until I get into some arcane situation where it doesn't do what I expect and I have to go find out.
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: 6158
  • Yes Pinky, Do-more will control the world!
Re: Software friendliness
« Reply #35 on: April 20, 2013, 12:19:11 AM »
It's totally ok. I'm not remotely offended and I hope you aren't either. I'm just trying to wrap my head around several user perspective things now between you and TM. The thing is, you guys use these products...I don't. So in the end my opinion is really irrelevant. Now I do know the product pretty darn well and there are probably some tricks I know that you don't, but in the end, how effective you are with the product is the only relevant point. I push back because I know things you might not, but I hope that you guys will also continue to push back about how you see things from a practical perspective. Engineering is a full contact sport. ;)

Franj and I were just talking earlier about what it would take to add roll-your-own structs. Don't think it would be too hard actually...even the UI would be pretty straightforward.
"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: 6158
  • Yes Pinky, Do-more will control the world!
Re: Software friendliness
« Reply #36 on: April 20, 2013, 12:21:17 AM »
I don't believe I've ever used the word "struct" to refer to anything but UDT's...

Believe it or not 'UDT' throws me every time you use it. We have a built-in block of time/date structures called 'UDT'...User Date/Time. I gotta keep reminding myself that you mean 'User Data Type'...
"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

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Software friendliness
« Reply #37 on: April 20, 2013, 01:16:21 AM »

Franj and I were just talking earlier about what it would take to add roll-your-own structs. Don't think it would be too hard actually...even the UI would be pretty straightforward.

I know you've said that it wasn't possible, but I think the real power in UDT's are implementing them in arrays. In fact, I'll bet that if I looked back on all the UDT's I've used, I can just about guess that all of the data types were used in an array, with arrays defined in the UDT . Sometimes its only way to store data efficiently.
« Last Edit: April 20, 2013, 01:24:33 AM by ATU »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Software friendliness
« Reply #38 on: April 20, 2013, 01:50:16 AM »
You can most certainly create arrays of structures, user defined included. But no, a structure cannot contain anything but simple types, and that is not likely to change any time soon. Personally, I think it is far more important to create arrays of structures than arrays within structures, but I can certainly see the benefits of both.
"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

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Software friendliness
« Reply #39 on: April 20, 2013, 09:16:06 AM »
What about a string? I don't suppose that's a simple data type?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Software friendliness
« Reply #40 on: April 20, 2013, 09:33:22 AM »
Unfortunately not. That's the one I would miss the most. It's not terrible to work around by creating arrays of strings in parallel to your array of structs, but I would love to have strings as struct fields. Sadly, it will take some major refactoring to make it work. Same issue as multidimensional arrays. But give us time... :)
"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: Software friendliness
« Reply #41 on: April 20, 2013, 10:03:43 AM »
Unfortunately not. That's the one I would miss the most. It's not terrible to work around by creating arrays of strings in parallel to your array of structs,

This actually works quite well.

Quote
but I would love to have strings as struct fields. Sadly, it will take some major refactoring to make it work. Same issue as multidimensional arrays. But give us time... :)

This would be awesome though!  ;D
Circumstances don't determine who we are, they only reveal it.

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

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Software friendliness
« Reply #42 on: April 20, 2013, 10:06:19 AM »
Maybe it would be better to approach this issue when you think about adding file/database/external storage in the future?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Software friendliness
« Reply #43 on: April 20, 2013, 03:41:04 PM »
It's totally ok. I'm not remotely offended and I hope you aren't either.

Not even close!  :) Frustrated sometimes that I'm not making myself clear, but even that's not with you or Host.

Quote
I'm just trying to wrap my head around several user perspective things now between you and TM. The thing is, you guys use these products...I don't. So in the end my opinion is really irrelevant

Well, sorta.  It's relevant to doing YOUR job.  We're spoiled in that we can trust you to do your job and not have to think about it.

Quote
Franj and I were just talking earlier about what it would take to add roll-your-own structs. Don't think it would be too hard actually...even the UI would be pretty straightforward.

PLEASE do this at your earliest opportunity.  It adds a lot of power and subtracts a lot of complexity from our work.
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: 3607
  • Darth Ladder
Re: Software friendliness
« Reply #44 on: April 20, 2013, 03:43:59 PM »
Believe it or not 'UDT' throws me every time you use it. We have a built-in block of time/date structures called 'UDT'...User Date/Time. I gotta keep reminding myself that you mean 'User Data Type'...

It's an AB thing!   :D

No, it doesn't surprise me at all.  I've never heard it anywhere else than AB, so that's why I was using "struct" (as distinguished from "structure"), both so as to be brand-agnostic and also because I'm talking to guys who program on PC's a lot.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.