Jump to content


Photo
* * * * * 1 votes

[CR] State Editor for JKI State Machine 1.6.0 LV8_6


  • Please log in to reply
26 replies to this topic

#1 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 01 June 2010 - 10:48 PM

Posted Image

Name: State Editor for JKI State Machine 1.6.0 LV8_6
Submitter: Bobillier
Submitted: 02 Jun 2010
File Updated: 21 Jul 2011
Category: JKI Right-Click Framework Plugins
LabVIEW Version: 8.6
License Type: BSD (Most common)

JKI State Editor v1.6.0

Copyright © 2010, BOBILLIER ERIC
All rights reserved.

Author: BOBILLIER ERIC & Ton Plomp
LAVA Name: BOBILLIER ERIC
Contact Info: Contact via PM on lavag.org

LabVIEW Versions:
8.5

Dependencies:
JKI Right Click Framework
oglib_array & oglib_string

Description:
This tool is a right click framework plug_in. it's use for edit easily string constant in in JKI state machine.

How use it:

Select one string constant in jki STM structure , run JKi RCF and choose JKI State Editor.

Installation and instructions:
This tool is package in .ogpb file. Please use VIPM for installation.

Examples of use:
First release.
http://www.screencas.../t/OGZkNTM4NzIt
Ton modification.
http://www.screencas...4c-33af05e59625


Known Issues:
If after using this tool, Undo action to return to initial string constant,is impossible.
It's bug of scripting feature.
Please look this tread for more details.
http://decibel.ni.co...d/7131?tstart=0

Acknowledgements:
all jki Team especialy PJM , and of course Ton Plomp, and Bjarne Joergensen

Version History:
v1.0.0: Initial release of the code.
v1.0.1: bug correction
v1.1.0: bug correction
v1.2.1: Ton modification
v1.2.2: Cleanup code for submission.(8.2 and up)
v1.3.1: New features and bugs correction (sorry only compatible with LV8.6 and up)
v1.4.1: New features and bugs correction (sorry only compatible with LV8.6 and up) see Revision Note
v1.4.2: New features and bugs correction (sorry only compatible with LV8.6 and up) see Revision Note
v1.5.0: New features and bugs correction (sorry only compatible with LV8.6 and up) see Revision Note
v1.6.0: New features.

* Now String States constant always grow at left and justify left when modify.

* Now only case structure connect to argument tunnel populate arguments list.

* You can right click on arguments list and add one case not previously define.

Run only if one case structure allready exist and connect to argument tunnel.

* Now String constant is colorize with different colors for arguments, comments
and lock states when you update it. Like that string constant text become more readable.
Colors can be configure in Rcf options.


License:
Copyright © 2010, Eric BOBILLIER All rights reserved.Redistribution
and use in source and binary forms, with or withoutmodification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. All advertising materials mentioning features or use of this
software must display the following acknowledgement:
This product includes software developed by the INRA.

4. Neither the name of the INRA nor the names of its contributors
may be used to endorse or promote products derived from
this software without specific prior written permission.THIS SOFTWARE
IS PROVIDED BY Eric BOBILLIER ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL Eric BOBILLIER BE LIABLE FOR ANY

DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Support:
If you have any problems with this code or want to suggest features:
please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and
search for the "JKI State Editor" support page.

Distribution:
This code was downloaded from the LAVA Code Repository found at lavag.org

Click here to download this file

#2 Ton Plomp

Ton Plomp

    How many lines per hour? Zero!

  • Premium Member
  • 1,973 posts
  • Location:Netherlands
  • Version:LabVIEW 2012
  • Since:2000

Posted 07 June 2010 - 07:23 PM

Hi Eric,

nice tool!

I've got two feature requests:
  • Double click on the left listbox should copy to right listbox
  • 'Delete' button should delete the current selected state

Ton

#3 Bjarne Joergensen

Bjarne Joergensen

    Very Active

  • Members
  • PipPipPip
  • 88 posts
  • Version:LabVIEW 8.2
  • Since:1997

Posted 09 June 2010 - 08:45 PM

Hi Eric

It's a wery nice tool you have made and it would be wery usefull to mePosted Image

I got a few comment to some of the features.

Case 1:
If the list of JKI states is longer than window can show and you select the buttom separator via QuickSelect, the window will scroll down to that selector and highlight it.
But if you select the top separator, the window don't scroll up so I can see the chosen/highlighted selector.

Case 2:
I don't understand how to use the comment states(s) function. When I use it it make a # in the start of the selected state, but that will make the whole state a comment!

Case 3:
If you have selected the last state in the States list and then press the move down button, then the state disappearPosted Image .

Regards Bjarne

#4 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 15 June 2010 - 10:26 AM

Hi Ton
I don't see where is problem . When you select one item in the right listbox and right click on it and select delete, the state is delete.
Do you whant a specific button for do that ?

  • 'Delete' button should delete the current selected state


For double click copy , i see for update.
Regards
Eric

Hi Bjarne
For case 1 and 3 you are rigth and i try to correct this.
For case 2 , the comment and uncomment function can be usefull if you when made test ,and temporaly unactive one or few states, without remove those states of string list.
Regards Eric

#5 Ton Plomp

Ton Plomp

    How many lines per hour? Zero!

  • Premium Member
  • 1,973 posts
  • Location:Netherlands
  • Version:LabVIEW 2012
  • Since:2000

Posted 15 June 2010 - 06:09 PM

Hi Ton
I don't see where is problem . When you select one item in the right listbox and right click on it and select delete, the state is delete.
Do you whant a specific button for do that ?

I meant Delete Key.

Ton

#6 Bjarne Joergensen

Bjarne Joergensen

    Very Active

  • Members
  • PipPipPip
  • 88 posts
  • Version:LabVIEW 8.2
  • Since:1997

Posted 16 June 2010 - 06:07 AM

Hi Bjarne
For case 2 , the comment and uncomment function can be usefull if you when made test ,and temporaly unactive one or few states, without remove those states of string list.
Regards Eric


Hi Eric

I can see your point, but it could leed to misunderstandings to use the word 'comment' because it meen something else in the JKI statemachine. A comment/explanation for the state, not a rem-out.
I think it would be nice to have a rem-out of states for test purpose.:thumbup1:
My sugestion is.
When I want to make a comment on a state the tool place '//' at the end of the state and set the curser after those two.
When I want to rem-out a state the tool place a # in front of the state.

best regards
Bjarne

Edited by Bjarne Joergensen, 16 June 2010 - 06:08 AM.


#7 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 18 June 2010 - 09:03 AM

Hi Ton & Bjarne
I have update my Plugin with your comments and more. (see revision note inside source folder) Please can you test it . Unfortunately, i just achieve a 8.6 convertion. When i try 8.2 & 8.5 convertion, the event structure in JKI state editor-Main.vi lost all is parameters. I don't see what's wrong.
Eric

Attached File  EBC_rcf_JKIStateEditor-1.3-1.zip   420.95K   87 downloads

Edited by Bobillier, 18 June 2010 - 09:05 AM.


#8 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 18 June 2010 - 08:47 PM

Sorry i have correct a minor error, please test this one.
Eric

Attached File  EBC_rcf_JKIStateEditor-1.3-1.zip   420.98K   78 downloads

Edited by Bobillier, 18 June 2010 - 08:48 PM.


#9 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 21 June 2010 - 08:48 AM

Oups
my previous .ogp file seen corrupt. Please try this :
Attached File  EBC_rcf_JKIStateEditor-1.3-1.ogp   190.37K   91 downloads
Eric

#10 Ton Plomp

Ton Plomp

    How many lines per hour? Zero!

  • Premium Member
  • 1,973 posts
  • Location:Netherlands
  • Version:LabVIEW 2012
  • Since:2000

Posted 21 June 2010 - 09:13 AM

Hi Eric,

that looks really nice!
It might be nice if comments were a different color (like syntax highlighting), but that is just a super silver lining request.

Ton

#11 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 21 June 2010 - 09:38 AM

Hi Ton
It's good idea, but i don't know how modify programmaticaly different text colors in a same element of a list (or between different element of this list) .
I have try to set a different color of one control (Ex argument) but the color is lost when i send it to list.
Any idea ?
Eric

It might be nice if comments were a different color (like syntax highlighting), but that is just a super silver lining request.



#12 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 25 June 2010 - 04:49 PM

Hi Bjarne and Ton
Here is new version who correct few of previous problem and add few updates compatible with your comments.
Regards
Eric
Attached File  Eric\'s State Editor 1.4.1.zip   499.6K   83 downloads

#13 Bjarne Joergensen

Bjarne Joergensen

    Very Active

  • Members
  • PipPipPip
  • 88 posts
  • Version:LabVIEW 8.2
  • Since:1997

Posted 26 June 2010 - 08:54 AM

Hi Eric

Sorry, but the file is doing the same as previous. VIMP will not accept it :o


Regards Bjarne

#14 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 26 June 2010 - 11:31 AM

Hi Bjarne
It's strange because on my PC (Windows7) all seen ok. I have install it few time with vipm without problem.
Please can you try again. Otherwise you can find all vi in the source folder of my previous post.
Eric
Attached File  EBC_rcf_JKIStateEditor-1.4-1.ogp   190.63K   151 downloads

#15 Bjarne Joergensen

Bjarne Joergensen

    Very Active

  • Members
  • PipPipPip
  • 88 posts
  • Version:LabVIEW 8.2
  • Since:1997

Posted 28 June 2010 - 08:10 PM

Hi Bjarne
It's strange because on my PC (Windows7) all seen ok. I have install it few time with vipm without problem.
Please can you try again. Otherwise you can find all vi in the source folder of my previous post.
Eric
Attached File  EBC_rcf_JKIStateEditor-1.4-1.ogp   190.63K   151 downloads


Hi Eric

Now it's working :worshippy:

A little thing more please :yes:

When you want to add a JKI state(also in the JKI argument list) it would be nice if you could rightClick :lol: at the JKI state and chose between 'Add before' or 'Add after' to place the new state compare to the state your standing at in the States list :thumbup1:

Thanks in advance

Bjarne

PS: Have found a solution for 8.2 support?

Edited by Bjarne Joergensen, 28 June 2010 - 08:15 PM.


#16 Bjarne Joergensen

Bjarne Joergensen

    Very Active

  • Members
  • PipPipPip
  • 88 posts
  • Version:LabVIEW 8.2
  • Since:1997

Posted 30 June 2010 - 07:25 PM

PS: Have found a solution for 8.2 support?


I meen, have you (Eric) found a solution fro LV8.2 support?:)

Regards Bjarne

#17 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 01 July 2010 - 08:30 AM

Hi Bjarne

When you want to add a JKI state(also in the JKI argument list) it would be nice if you could rightClick :lol: at the JKI state and chose between 'Add before' or 'Add after' to place the new state compare to the state your standing at in the States list :thumbup1:


I have add this feature in my new version , but not like right click, but like a specific button. Now i work arround add one undo functionality. I send you one copy quickly.

PS: Have found a solution for 8.2 support?


Not now , but if you find solution i will be happy.I think it's attound one event structure condition you not run in 8.2 and 8.5.

Regards
Eric

#18 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 03 July 2010 - 12:00 PM

Hi Bjarne
It's my last version, unfortunately i haven't implement Undo function (a bit complicate).
Regards
Eric
Attached File  Eric\'s State Editor 1.4.2.zip   452.8K   90 downloads

#19 Ton Plomp

Ton Plomp

    How many lines per hour? Zero!

  • Premium Member
  • 1,973 posts
  • Location:Netherlands
  • Version:LabVIEW 2012
  • Since:2000

Posted 03 July 2010 - 02:40 PM

It's my last version, unfortunately i haven't implement Undo function (a bit complicate).

Eric,

one easy way for an undo functions is storing the current table after every edit in a shift register
Each array should be packed into a cluster, which will be stored inside an array shift register.

Ton

#20 Bobillier

Bobillier

    Very Active

  • Members
  • PipPipPip
  • 146 posts
  • Location:Rennes France
  • Version:LabVIEW 2009
  • Since:2009

Posted 04 July 2010 - 12:08 AM

Eric,

one easy way for an undo functions is storing the current table after every edit in a shift register
Each array should be packed into a cluster, which will be stored inside an array shift register.

Ton

hi Ton
Thanks for your reply . i know how do undo function. But the problem is not how , but when.
You said " one easy way for an undo functions is storing the current table after every edit", but in my program, there is few
way for modify current table value ( double click, drag and drop, modification of each caracter of comment and argument, right click option,,...)
lot of them creat event but not all (Drag and drop) . Each caracters modification of comment and argument creat one modificationof table but i just whant only one undo for restore all previous value ( and not few).
I have try with LIFO structure but with few errors. If you have any simple solution to slove my undo problem i'm receiver .
Eric

Edited by Bobillier, 04 July 2010 - 12:09 AM.