tests/canopen_slave/plc.xml
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 25 May 2018 17:23:15 +0300
changeset 2166 5ce6d08ff2c7
parent 436 c926a8037adc
child 2346 ac16bad593cf
permissions -rw-r--r--
make clipboard open minimal time as wxPython documentation recommends

https://wxpython.org/Phoenix/docs/html/wx.Clipboard.html#wx.Clipboard.GetData

"Call wx.Clipboard.Open to get ownership of the clipboard. If this
operation returns True, you now own the clipboard. Call
wx.Clipboard.SetData to put data on the clipboard, or
wx.Clipboard.GetData to retrieve data from the clipboard. Call
wx.Clipboard.Close to close the clipboard and relinquish ownership.
You should keep the clipboard open only momentarily."

Maybe it makes situation with pretty annoying error 'clipboard already
open' a little bit better.

traceback:
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/BeremizIDE.py", line 955, in OnSaveProjectMenu
self.RefreshAfterSave()
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/BeremizIDE.py", line 946, in RefreshAfterSave
self._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES)
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/IDEFrame.py", line 926, in _Refresh
self.RefreshFunctions[element]()
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/BeremizIDE.py", line 766, in RefreshEditMenu
IDEFrame.RefreshEditMenu(self)
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/IDEFrame.py", line 1185, in RefreshEditMenu
if self.GetCopyBuffer() is not None:
File "/home/developer/WorkData/PLC/beremiz/avangard-beremiz-ide/src/../../beremiz/IDEFrame.py", line 956, in GetCopyBuffer
if wx.TheClipboard.Open():
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_misc.py", line 5793, in Open
return _misc_.Clipboard_Open(*args, **kwargs)
<class 'wx._core.PyAssertionError'>: C++ assertion "!m_open" failed at ../src/gtk/clipbrd.cpp(598) in Open(): clipboard already open
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://www.plcopen.org/xml/tc6.xsd"
         xmlns:xhtml="http://www.w3.org/1999/xhtml"
         xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd">
  <fileHeader companyName="beremiz"
              productName="beremiz"
              productVersion="1"
              creationDateTime="2008-06-24T18:44:00"/>
  <contentHeader name="canopen_slave"
                 modificationDateTime="2008-10-24T09:32:01"
                 language="en-US">
    <coordinateInfo>
      <fbd>
        <scaling x="0" y="0"/>
      </fbd>
      <ld>
        <scaling x="0" y="0"/>
      </ld>
      <sfc>
        <scaling x="0" y="0"/>
      </sfc>
    </coordinateInfo>
  </contentHeader>
  <types>
    <dataTypes/>
    <pous>
      <pou name="test_main" pouType="program">
        <interface>
          <localVars>
            <variable name="outvar" address="%QW0.0.8192.0">
              <type>
                <INT/>
              </type>
            </variable>
            <variable name="invar" address="%IW0.0.8193.0">
              <type>
                <INT/>
              </type>
            </variable>
          </localVars>
        </interface>
        <body>
          <FBD>
            <outVariable localId="1" height="29" width="80">
              <position x="362" y="140"/>
              <connectionPointIn>
                <relPosition x="0" y="14"/>
                <connection refLocalId="4" formalParameter="OUT">
                  <position x="362" y="154"/>
                  <position x="330" y="154"/>
                  <position x="330" y="153"/>
                  <position x="299" y="153"/>
                </connection>
              </connectionPointIn>
              <expression>outvar</expression>
            </outVariable>
            <inVariable localId="2" height="29" width="20">
              <position x="100" y="115"/>
              <connectionPointOut>
                <relPosition x="20" y="14"/>
              </connectionPointOut>
              <expression>1</expression>
            </inVariable>
            <block localId="4" width="75" height="60" typeName="ADD">
              <position x="224" y="123"/>
              <inputVariables>
                <variable formalParameter="IN1">
                  <connectionPointIn>
                    <relPosition x="0" y="30"/>
                    <connection refLocalId="2">
                      <position x="224" y="153"/>
                      <position x="183" y="153"/>
                      <position x="183" y="129"/>
                      <position x="120" y="129"/>
                    </connection>
                  </connectionPointIn>
                </variable>
                <variable formalParameter="IN2">
                  <connectionPointIn>
                    <relPosition x="0" y="50"/>
                    <connection refLocalId="5">
                      <position x="224" y="173"/>
                      <position x="187" y="173"/>
                      <position x="187" y="187"/>
                      <position x="150" y="187"/>
                    </connection>
                  </connectionPointIn>
                </variable>
              </inputVariables>
              <inOutVariables/>
              <outputVariables>
                <variable formalParameter="OUT">
                  <connectionPointOut>
                    <relPosition x="75" y="30"/>
                  </connectionPointOut>
                </variable>
              </outputVariables>
            </block>
            <inVariable localId="5" height="29" width="60">
              <position x="90" y="173"/>
              <connectionPointOut>
                <relPosition x="60" y="14"/>
              </connectionPointOut>
              <expression>invar</expression>
            </inVariable>
          </FBD>
        </body>
      </pou>
    </pous>
  </types>
  <instances>
    <configurations>
      <configuration name="conf">
        <resource name="res">
          <task name="tache" interval="00:00:00.010000" priority="0">
            <pouInstance name="toto" type="test_main"/>
          </task>
        </resource>
      </configuration>
    </configurations>
  </instances>
</project>