community.notepad-plus-plus.org
Open in
urlscan Pro
104.131.212.184
Public Scan
Submitted URL: https://notepad-plus-plus.org/community/topic/12520/function-list-for-simatic
Effective URL: https://community.notepad-plus-plus.org/topic/12520/function-list-for-simatic
Submission: On August 18 via manual from AZ — Scanned from FR
Effective URL: https://community.notepad-plus-plus.org/topic/12520/function-list-for-simatic
Submission: On August 18 via manual from AZ — Scanned from FR
Form analysis
2 forms found in the DOMGET /search
<form action="/search" method="GET">
<button type="button" class="btn btn-link"><i class="fa fa-lg fa-fw fa-search" title="Recherche"></i></button>
<input autocomplete="off" type="text" class="form-control hidden" name="term" placeholder="Recherche">
<button class="btn btn-primary hidden" type="submit"></button>
<input type="text" class="hidden" name="in" value="titles">
</form>
GET
<form id="search-form" class="navbar-form navbar-right hidden-xs" role="search" method="GET" data-original-title="" title="">
<button id="search-button" type="button" class="btn btn-link"><i class="fa fa-search fa-fw" title="Recherche"></i></button>
<div class="hidden" id="search-fields">
<div class="form-group">
<input autocomplete="off" type="text" class="form-control" placeholder="Recherche" name="query" value="">
<a href="#"><i class="fa fa-gears fa-fw advanced-search-link"></i></a>
</div>
<button type="submit" class="btn btn-default hide">Recherche</button>
</div>
</form>
Text Content
* Récent * Mots-clés * Populaire * Utilisateurs * Groupes * Recherche * Se connecter COMMUNITY * Se connecter * Recherche * Recherche * * Récent * Mots-clés * Populaire * Utilisateurs * Groupes * Recherche Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode. Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript). FUNCTION LIST FOR SIMATIC Help wanted · · · – – – · · · functions functions list customize 2 20 11.1k Charger plus de messages * Du plus ancien au plus récent * Du plus récent au plus ancien * Les plus votés Répondre * Répondre à l'aide d'un nouveau sujet Se connecter pour répondre Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir. * Burak Tavukcuoglu dernière édition par Burak Tavukcuoglu 14 oct. 2016, 10:01 14 oct. 2016, 09:59 In the programming language that I use (Siemens Sinumerik 840 d sl), functions are displayed like this: %_N_CH2_SAW_MPF. %underlineNunderline and then the function name. Now I would like to view all my functions in the function list at Notepad++. I added the following code into the functionlist.xml. But still, functions don’t come up. Maybe I am doing something wrong with the code. Comments are written simply with ’ ; '. For example: ; Damping move off. I would be glad if someone could help me. Thanks! <association langID="50" id="NC_function"/> <association id="NC_function" userDefinedLangName="NC_function" /> <association id="NC_function" ext=".arc" /> <parser id="NC_function" displayName="NC_function" commentExpr="(;.*)?$"> <function mainExpr="^([%_N_]*[_A-Za-z])\w*:" displayMode="$functionName"> <functionName> <nameExpr expr="\w+"/> </functionName> </function> </parser> 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par MAPJe71 14 oct. 2016, 17:32 14 oct. 2016, 17:31 Could you supply an example file for test/verify? 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par MAPJe71 14 oct. 2016, 17:51 14 oct. 2016, 17:49 FYI: 1. LangID 50 is intended for COBOL; 2. When using the userDefinedLangName association, make sure you have a UserDefinedLanguage (UDL) with exactly the same name i.e. there should be a NC_function entry in the Notepad++ Language menu. Could you try this parser … <association id="NC_function" userDefinedLangName="NC_function" /> <association id="NC_function" ext=".arc" /> <parser id="NC_function" displayName="NC_function" commentExpr="(?m-s:;.*?$)"> <function mainExpr="^%_N_\K[A-Za-z_]\w*:" > <functionName> <nameExpr expr="\w+"/> </functionName> </function> </parser>``` 1 réponse Dernière réponse Répondre Citer 0 * Burak Tavukcuoglu dernière édition par 14 oct. 2016, 20:48 Of course! This is how a sub-function looks like with M17 marking the end of the function. %_N_WAITE_CH2_FREE_SPF ;$PATH=/_N_SPF_DIR HOLDON: G04 F0.1 STOPRE IF Channel2 <> 0 GOTOB HOLDON STOPRE MSG() M17 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par 14 oct. 2016, 21:35 Thanks! In your example the function name (%_N_WAITE_CH2_FREE_SPF) does not end with a colon but in your parser you end the main-expression with a colon (^([%_N_]*[_A-Za-z])\w*:). Which one is correct? Do you have a link to a Siemens document that describes the syntax of the numeric control language? 1 réponse Dernière réponse Répondre Citer 0 * Burak Tavukcuoglu dernière édition par 14 oct. 2016, 21:40 The code did not work. http://imgur.com/rQLGnfL Here you can see that userDefinedLangName is the same name as the entry in the language menu. Without the colon is the correct version. 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par 14 oct. 2016, 21:45 Here’s an update … <association id="NC_function" userDefinedLangName="NC 840dsl" /> <association id="NC_function" ext=".arc" /> <parser id="NC_function" displayName="NC 840dsl" commentExpr="(?m-s:;.*?$)"> <function mainExpr="^%_N_\K[A-Za-z_]\w*" /> </parser> 1 réponse Dernière réponse Répondre Citer 0 * Burak Tavukcuoglu dernière édition par 14 oct. 2016, 23:40 First of all, thanks a lot for your help and time MAPJe71 I found this document for the syntax. https://support.industry.siemens.com/cs/document/109248664/sinumerik-840d-sl-job-planning?dti=0&pnid=14599&lc=en-WW To wrap it up, I wrote down the current state of the function list. It still doesnt work. :( <association id="NC_function" userDefinedLangName="NC 840dsl" /> <association id="NC_function" ext=".arc" /> <parser id="NC_function" displayName="NC 840dsl" commentExpr="(?m-s:;.*?$)"> <function mainExpr="^%_N_\K[A-Za-z_]\w*" /> <functionName> <nameExpr expr="\w+"/> </functionName> </function> </parser> 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par 15 oct. 2016, 00:44 You didn’t correctly copy-paste the parser-node I posted. Remove the … <functionName> <nameExpr expr="\w+"/> </functionName> </function> part or re-copy/paste so it looks like this … <parser id="NC_function" displayName="NC 840dsl" commentExpr="(?m-s:;.*?$)"> <function mainExpr="^%_N_\K[A-Za-z_]\w*" /> </parser> Also check whether or not you edited the right functionList.xml file as there might be more than one on your system: 1. %ProgramFiles%\Notepad++\functionList.xml; 2. %ProgramFiles(x86)%\Notepad++\functionList.xml; 3. %AppData%\Notepad++\functionList.xml Furthermore, make sure to restart Notepad++ after you edited and saved the XML-file. 1 réponse Dernière réponse Répondre Citer 0 * Burak Tavukcuoglu dernière édition par Burak Tavukcuoglu 16 oct. 2016, 21:52 16 oct. 2016, 21:51 It did work!! Thank you!! Apperantly I modified the false file. Namely, %APPDATA%\notepad++\functionList.xml as in https://notepad-plus-plus.org/features/function-list.html, and not as you mentioned above: %ProgramFiles(x86)%\Notepad++\functionList.xml. Thanks MAPJe71, you really helped me a lot. My best regards! 1 réponse Dernière réponse Répondre Citer 0 * environ 26 jours * Burak Tavukcuoglu dernière édition par 11 nov. 2016, 11:54 Hi! I recently discovered a bug in the function list feature. (or something I overlooked) The function list works great. But when I open certain files, functions are not being listed. However, when I copy the content of my code to a new window, functions are listed just as normal. This does not happen with every file. With file names such as: SPF_DIR.arc and MPF_DIR.arc, it happens all the time. Are those file names not permitted in Notepad++? Thanks! 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par 11 nov. 2016, 16:21 AFAIK there’s no restriction on file names other than the standard Windows restrictions. Could you post the files and the Notepad++ Debug Info (you can find it in the ? menu) so I can try to reproduce the problem? 1 réponse Dernière réponse Répondre Citer 0 * Burak Tavukcuoglu dernière édition par 11 nov. 2016, 22:46 https://www.dropbox.com/sh/53wxnnxioxmcj8p/AADzd9wMDWoCVTgVrZJdqqL-a?dl=0 In the shared folder, there is a file which I am trying to display the functions of it and the respective functionlist and the user defined language. Due to the copywrite agreements, I can not post the complete code that is why I trimmed the code to the function names. I tried to view the functions, it didnt work. Many thanks! 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par 11 nov. 2016, 22:55 > Due to the copyright agreements, I can not post the complete code … I understand and so far the trimmed down code helps, as it does not show any functions on my system either. I’ll have a look. 1 réponse Dernière réponse Répondre Citer 0 * Burak Tavukcuoglu dernière édition par 11 nov. 2016, 23:27 Thank you for correcting me. I probably typed it really quick. :) I can confirm that the regex file you provided, really did the trick and the function view normally works. It fails to show the functions whenever I try to open a new file Once again thank you so much for your help! 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par MAPJe71 11 nov. 2016, 23:36 11 nov. 2016, 23:35 You’re welcome! 1. Incomplete parser; 2. Known bug with comment following function header. ad.1. Adapt parser to: <parser id="NC_function" displayName="NC 840dsl" commentExpr="(?m-s:;.*?$)"> <function mainExpr="(?m)^%_N_\K[A-Za-z_]\w*" /> </parser> ad.2. There have to be at least two characters between the function header and the comment. e.g. a line-break and a space %_N_CH1_BASIC_POS_SPF ;$PATH=/_N_SPF_DIR ;(c)2013 by Linsinger Maschinenbau Ges.m.b.H. or two line-breaks %_N_CH1_BASIC_POS_SPF ;$PATH=/_N_SPF_DIR ;(c)2013 by Linsinger Maschinenbau Ges.m.b.H. or two spaces %_N_CH1_BASIC_POS_SPF ;$PATH=/_N_SPF_DIR ;(c)2013 by Linsinger Maschinenbau Ges.m.b.H. or a colon and a line-break %_N_CH1_BASIC_POS_SPF: ;$PATH=/_N_SPF_DIR ;(c)2013 by Linsinger Maschinenbau Ges.m.b.H. etc. 1 réponse Dernière réponse Répondre Citer 0 * Burak Tavukcuoglu dernière édition par 11 nov. 2016, 23:51 It is weird. Because it doesnt happen with other files even though the comment line is right below the function tag. Thanks for your time and help! 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par 12 nov. 2016, 00:08 Had another look … ad.2. or make sure your line-breaks consist of a carriage-return and a line-feed (i.e. two characters). Your SPF_DIR - Kopie.arc uses line-feeds for line-breaks i.e. only one character between tag and comment. 1 réponse Dernière réponse Répondre Citer 0 * Burak Tavukcuoglu dernière édition par 12 nov. 2016, 14:12 Is it possible to add an exception into comments section? For example: everything is a comment except when $PATH comes right after ‘;’. 1 réponse Dernière réponse Répondre Citer 0 * MAPJe71 dernière édition par 13 nov. 2016, 03:33 Yes that can work, in your case! Change commentExpr to "(?m-s:;(?!\$PATH).*?$)". 1 réponse Dernière réponse Répondre Citer 0 1 sur 20 * Premier message Dernier message Aller à mon prochain message Copyright © 2014 NodeBB Forums | Contributors * * * * * 1 / 1 * * × Il semble que votre connexion ait été perdue, veuillez patienter pendant que nous vous re-connectons.