零成本给 KUKA KRC4 的 SmartHMI 增加一个菜单来调用外部 Windows 应用程序

目录 Content
[hide]

KUKA 的 KRC4 采用的 Windows 系统,所以“可玩性”大大增加,所以就有了从 SmartHMI 中调用外部 Windows 应用程序的需求,于是有同好研究了这个问题,并且分享了方法。LT 觉得不错,就转过来备忘。

( 2016-04-15:本文描述方法适用于 KSS 8.2 版本 )

一、Vergeithor的描述

在这个帖子里,Vergeithor 做了方法描述:

The file you have to edit is "c:\KRC\SmartHMI\SmartHMI.exe.config"

Internally is formated in a xml way, so is very easy to modify, exemple:

Imagine that you want to add a value new intem called "TEST ITEM" on the "DIAGNOSTIC" submenu under the "KrcDiag" item that calls an exe called "testProgram.exe":

1.- Open the file and search for the string "%KrcDiag" BUT is not the first occurence, maybe the 2nd or 3rd, you'll know that is the right one b'cos the MergeOrder="900"

            <MenuItem DisplayName="%KrcDiag" MergeOrder="900">
               <CommandCall Target="ProcessStarter.StartProcess">
                  <Argument Name="FileName">C:\KRC\UTIL\KRCDiag\KRCDiag.exe</Argument>
                  <Argument Name="Options">None</Argument>
               </CommandCall>
            </MenuItem>

2.- Copy & Paste this xml block and replace the name and filename for the ones that you want to use. Also change the MergeOrder to make your item under this one:

            <MenuItem DisplayName="%TestItem" MergeOrder="1000">
               <CommandCall Target="ProcessStarter.StartProcess">
                  <Argument Name="FileName">C:\KRC\TestProgram.exe</Argument>
                  <Argument Name="Options">None</Argument>
               </CommandCall>
            </MenuItem>


3.- Save the file and reestart HMISmartPad.exe, you can do it or by a cold re start or closing the HMISmartPad program from the console and starting it again.

二、实践结果

根据提示,可以知道 %KrcDiag 路径是 /configuration/KukaRoboter.SmartHMI.Menu/MenuRoot[4]/MenuFolder[4]/MenuItem[4]。 LT 打算把 PuTTYtel  这个工具集成进去:

<MenuItem DisplayName="%PuTTYtel" MergeOrder="1000">
    <CommandCall Target="ProcessStarter.StartProcess">
        <Argument Name="FileName">C:\Windows\System32\PuTTYtel.exe</Argument>
        <Argument Name="Options">None</Argument>
        <Argument Name="Arguments">-vio -noflush</Argument>
    </CommandCall>
</MenuItem>

 

最终是这个样子,还不错!

SmartHMI_MENU_PuTTYtel

三、注意事项

在生产环境中稳定性可行性未验证!

关键字:SmartHMI, 菜单, 外部程序

One thought on “零成本给 KUKA KRC4 的 SmartHMI 增加一个菜单来调用外部 Windows 应用程序

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.