Host Engineering Forum

General Category => General Discussion => Topic started by: PLCGuy on September 29, 2018, 05:50:33 PM

Title: Creating a Program
Post by: PLCGuy on September 29, 2018, 05:50:33 PM
I was creating a new program and had a white space in the name. The red diamond appeared. I corrected it but the red diamond stayed red. I just pressed okay anyhow and all was good. Is this normal behavior after correcting the name?
Title: Re: Creating a Program
Post by: PLCGuy on September 29, 2018, 05:57:59 PM
Another one. I changed the execution order but it did not reflex the change in the pane. I fiddled around and found the sort, then chose sort by execution order. Could that be a pop up sort box when selecting change execution order?
Title: Re: Creating a Program
Post by: franji1 on October 01, 2018, 09:10:20 AM
I was creating a new program and had a white space in the name. The red diamond appeared. I corrected it but the red diamond stayed red. I just pressed okay anyhow and all was good. Is this normal behavior after correcting the name?

I presume this was in the "Create New User Code Block" dialog.  I could not duplicate it.  As soon as I deleted the space, "My Program" to "MyProgram" it went yellow (meaning the heap-item does not exist yet, but it will as soon as you hit OK).

I tried it on 2.3 and 2.0 and it behaved as expected.

If it was red, it could be the name was invalid for some other reason, so hitting OK would have given you THAT issue.  But you said that you hit OK and all was fine.  :-\  That is what concerns me.  If you can remember, please tell me the steps you took so I can (hopefully) duplicate it.  What was the actual name (and could you have had another similar named code-block that was an EXISTING TASK vs. a NEW PROGRAM, for example).
Title: Re: Creating a Program
Post by: PLCGuy on October 01, 2018, 12:30:48 PM
Okay, try this.
Create new user block.

Type in Run Program, you get the red.
Then use the arrow key to move curser before the white space. Type _ then it will look like this :Run_ Program. Then press delete to remove the white space, and the red diamond does not change.
Title: Re: Creating a Program
Post by: franji1 on October 02, 2018, 09:48:07 AM
Okay, try this.
Create new user block.

Type in Run Program, you get the red.
Then use the arrow key to move curser before the white space. Type _ then it will look like this :Run_ Program. Then press delete to remove the white space, and the red diamond does not change.

Interesting!?!  I was able to duplicate it, as you stated.

I will look at it.  Thanks for figuring this out!!!
Title: Re: Creating a Program
Post by: franji1 on October 02, 2018, 10:11:27 AM
Fixed.
Title: Re: Creating a Program
Post by: Bolt on October 12, 2018, 11:32:20 AM
On a similar note, when re-configuring an existing code block, there is no green/yellow/red indicator in the name box, so if you are re-naming the program, it doesn't show if you're too long, contain invalid characters, etc.
Title: Re: Creating a Program
Post by: franji1 on October 12, 2018, 11:11:59 PM
If you look closer, it is because you cannot rename it from that dialog - it is a readonly field.

To rename the heap item, you must rename it from the Memory Configuration dialog.
Title: Re: Creating a Program
Post by: Bolt on October 14, 2018, 12:20:55 PM
But you can rename it from there, and it changes the corresponding heap item.

It's no big deal, but I figured if you were going to fix 1 bug in the box, you might as well fix 2 :P
Title: Re: Creating a Program
Post by: PLCGuy on October 14, 2018, 07:07:39 PM
Just to add, I was in Edit Mode and right mouse clicked on one of my program names. I was able to change the name after selecting re-configure. I did not go through my program and see if anything got screwed up  by changing the name. Tomorrow I will check the plc config to see if it was changed there.
Title: Re: Creating a Program
Post by: franji1 on October 14, 2018, 08:12:10 PM
Just to add, I was in Edit Mode and right mouse clicked on one of my program names. I was able to change the name after selecting re-configure. I did not go through my program and see if anything got screwed up  by changing the name. Tomorrow I will check the plc config to see if it was changed there.

The rename should have gone through OK.  Any RUN/ENTASK/CALL or struct member references would have been renamed correctly.