Code Monkey home page Code Monkey logo

awlsim's Introduction

Hi there 👋, this is Michael Büsch

I am a

  • Rustacean
  • Open Source and Free Software developer
  • Professional embedded systems software developer

awlsim's People

Contributors

mbuesch avatar rahix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awlsim's Issues

Incorrect rounding of RND+ and RND- instructions

For values above -1.0 and below 0.0 the instructions RND+ and RND- round incorrectly.

RND+:
For -1.0 < ACCU1 < 0.0:
Expected result: 0
Actual incorrect result: 1

RND-:
For -1.0 < ACCU1 < 0.0:
Expected result: -1
Actual incorrect result: 0

GUI: FUP editor does not work on Python 2.7/3.2

  1. GUI startup aborts with a syntax error:
  File ".../awlsim/gui/fup/fup_elem.py", line 410
    LineSeg2D.fromCoords(*trans.map(tlX, tlY), *trans.map(trX, trY)),
                                               ^
SyntaxError: invalid syntax

fixed by 5896e57

  1. All wire lines are marked as "colliding".

fixed by 1da9447

awlsimhw_linuxcnc: Error on clicking "Add inspection: Online block"

An error occurs when the server passes an instance of hal to gui.

Traceback (most recent call last):
  File "/home/lcnc/awlsim/examples/linuxcnc-demo/../..//awlsim-linuxcnc-hal", line 438, in <module>
    sys.exit(main())
  File "/home/lcnc/awlsim/examples/linuxcnc-demo/../..//awlsim-linuxcnc-hal", line 394, in main
    server.run()
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1691, in run
    self.__handleCommunication()		#@cy-win
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1466, in __handleCommunication
    self.__handleSocketComm(rlist)
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1439, in __handleSocketComm
    self.__handleClientComm(self.__sock2client[sock])
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1423, in __handleClientComm
    handler(self, client, msg)
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1340, in __rx_GET_IDENTS
    client.transceiver.send(reply)
  File "/home/lcnc/awlsim/awlsim/coreserver/messages.py", line 1918, in send
    data = memoryview(msg.toBytes())
  File "/home/lcnc/awlsim/awlsim/coreserver/messages.py", line 1582, in toBytes
    payload.append(self.packString(pVal))
  File "/home/lcnc/awlsim/awlsim/coreserver/messages.py", line 180, in packString
    return cls.packBytes(string.encode("utf-8", "strict"))
AttributeError: Pin 'encode' does not exist

In file "awlsim/coreserver/messages.py" attached such a bone:

175: 	@classmethod
	def packString(cls, string):
		try:
			if not string:
				string = ""
			try:
				ret=cls.packBytes(string.encode("utf-8", "strict"))
			except:
				ret=cls.packBytes("")

			return ret 
		except UnicodeError as e:
			raise ValueError

awlsimhw_linuxcnc: Error on loading program to CPU

When gui reloads the program, the instance variable hal is cleared. The hal.ready () function is also executed twice, which causes an error.

Traceback (most recent call last):
  File "/home/lcnc/awlsim/examples/linuxcnc-demo/../..//awlsim-linuxcnc-hal", line 438, in <module>
    sys.exit(main())
  File "/home/lcnc/awlsim/examples/linuxcnc-demo/../..//awlsim-linuxcnc-hal", line 394, in main
    server.run()
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1683, in run
    self.__handleCommunicationBlocking()
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1506, in __handleCommunicationBlocking
    self.__handleCommunication()
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1466, in __handleCommunication
    self.__handleSocketComm(rlist)
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1439, in __handleSocketComm
    self.__handleClientComm(self.__sock2client[sock])
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1423, in __handleClientComm
    handler(self, client, msg)
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1049, in __rx_RUNSTATE
    self.setRunState(self.STATE_RUN)
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 642, in setRunState
    raise e
AttributeError: 'unicode' object has no attribute 'ready'

I came up with adding a global variable for hal instance.

In file "awlsim/coreserver/server.py" added
304: self.linuxcncHALcomponent = None
and

961: if "linuxcnc" in hwmodName:
hwmodDesc.setParameterValue('hal',self.linuxcncHALcomponent)

In file "awlsim_linuxcnc_hal"
359: server.linuxcncHALcomponent = hal

In file "awlsimhw_linuxcnc/main.py"

207: if not self.LinuxCNC_HAL.component_is_ready("awlsim"):
self.hal.ready()

AWL translation issues

I am not sure what to do about these issues, I'd like to use the AWL file as is but it is from the 90's and I'm not sure what may have changed since then. I've attached screenshots and the original AWL file

Screen Shot 06-11-21 at 07 09 PM 52
Screen Shot 06-11-21 at 07 14 PM 25
Screen Shot 06-10-21 at 06 05 PM 20
mill55awl.txt

Using raw calls on blocks that are not raw crashes the interpreter

FUNCTION FC 1 : VOID
        VAR_INPUT
                IN0     : INT;
        END_VAR
BEGIN
        L       #IN0
END_FUNCTION


ORGANIZATION_BLOCK OB 1
BEGIN
        UC      FC 1
        CALL SFC 46 // STOP CPU
END_ORGANIZATION_BLOCK
Traceback (most recent call last):
  File "./awlsim-test", line 578, in <module>
    sys.exit(main())
  File "./awlsim-test", line 575, in main
    return run(inputFile)
  File "./awlsim-test", line 245, in run
    s.runCycle()
  File "/home/mb/develop/git/awlsim/awlsim/core/main.py", line 207, in runCycle
    self.cpu.runCycle()
  File "/home/mb/develop/git/awlsim/awlsim/core/cpu.py", line 882, in runCycle
    self.__runOB(self.obs[1])
  File "/home/mb/develop/git/awlsim/awlsim/core/cpu.py", line 823, in __runOB
    insn.run()
  File "/home/mb/develop/git/awlsim/awlsim/core/instructions/insn_l.py", line 42, in run
    self.cpu.accu1.set(self.cpu.fetch(self.ops[0], {8, 16, 32}))
  File "/home/mb/develop/git/awlsim/awlsim/core/cpu.py", line 1261, in fetch
    return fetchMethod(self, operator, enforceWidth)
  File "/home/mb/develop/git/awlsim/awlsim/core/cpu.py", line 1490, in fetchNAMED_LOCAL
    return self.fetch(self.__translateFCNamedLocalOper(operator, False),
  File "/home/mb/develop/git/awlsim/awlsim/core/cpu.py", line 1201, in __translateFCNamedLocalOper
    interfOp = self.callStackTop.interfRefs[operator.interfaceIndex].resolve(store)
AttributeError: 'CallStackElem' object has no attribute 'interfRefs'

It should fail gracefully instead.

Function / Functionblock Calls (Syntax)

According to the specification brackets and commas are not required for function block / function calls:

CALL FB 27 , DB 27
RZNR := EB11
Q1_IMP := L40.0
Q2_IMP := L40.1

GUI freeze and doesn't respond

On Windows, the system works as usual, but on Linux the Avlsim interface freezes. If you do not press the disconnect button, then everything also works as usual.

Steps to reproduce the issue:

  1. Press server connection button and start simulator core.
  2. Press server connection button to disconect.
  3. Close window or press exit button.
  4. ...
AwlSimServer: [2.304] Received message: RUNSTATE 0
awlsim-gui: [5.546] AwlSimClient: Received message 0x0000
AwlSimServer: [2.305] Client '[127.0.0.1]:36058' disconnected
AwlSimServer: [5.212] Received signal 15
AwlSimServer: [5.213] Switched to AUTO garbage collection.

awlsimhw_linuxcnc: Changing linuxcnc I/O number cause error.

When in gui you change the number of inputs or outputs, the hal component is not updated.

Traceback (most recent call last):
  File "/home/lcnc/awlsim/examples/linuxcnc-demo/../..//awlsim-linuxcnc-hal", line 441, in <module>
    sys.exit(main())
  File "/home/lcnc/awlsim/examples/linuxcnc-demo/../..//awlsim-linuxcnc-hal", line 397, in main
    server.run()
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1683, in run
    self.__handleCommunicationBlocking()
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1506, in __handleCommunicationBlocking
    self.__handleCommunication()
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1466, in __handleCommunication
    self.__handleSocketComm(rlist)
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1439, in __handleSocketComm
    self.__handleClientComm(self.__sock2client[sock])
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1423, in __handleClientComm
    handler(self, client, msg)
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 1049, in __rx_RUNSTATE
    self.setRunState(self.STATE_RUN)
  File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 642, in setRunState
    raise e
AttributeError: Pin 'output.u31.6.active' does not exist

To reload hal you can use a bash script like this:

halcmd unloadusr awlsim
halcmd loadusr -Wn awlsim awlsim-linuxcnc-hal --listen localhost:4151 linuxcnc-demo.awlpro

But "unloadusr" breaks all networks, so it's better to call "source":

halcmd unloadusr awlsim
halcmd source awlsim.hal

It would also be nice to have this code called when the awlsim component crash:

        import linuxcnc
	command = linuxcnc.command()
	command.state( linuxcnc.STATE_OFF )
        command.state( linuxcnc.STATE_ESTOP )
	command.wait_complete()

For example, if a component stops during a zero search on a machine, this will result in physical damage to the axis, so it is better to stop the component. You can also add a parameter for the user what to do during an accident.

awlsimhw_linuxcnc: Error on launching linuxcnc example

An error occurs when a clean instance hal is passed to the descriptor.

Traceback (most recent call last): File "/home/lcnc/awlsim/examples/linuxcnc-demo/../..//awlsim-linuxcnc-hal", line 438, in <module> sys.exit(main()) File "/home/lcnc/awlsim/examples/linuxcnc-demo/../..//awlsim-linuxcnc-hal", line 390, in main server.setRunState(server.STATE_RUN) File "/home/lcnc/awlsim/awlsim/coreserver/server.py", line 642, in setRunState raise e AttributeError: 'unicode' object has no attribute 'ready'

In file "awlsim/awlsim/common/hwmod.py" empty quotes cause an error.

159:  	def setParameterValue(self, name, value):
		"""Set the value of a parameter.
		"""
		self.parameters[name] = value or ""
		self.__identHash = None

Connecting LINUXCNC to physical CNC machine using AWLSIM

I am admittedly having a hard time with this part! I am not sure where to go next but other than AWL file issues I think this is my last hurdle.

Map1

Do I need some commercial ethernet to PLC hardware? The machine uses RS485 in particular, and I have all sorts of adapters.

Also is there some slack channel for forum we can use for support / documentation?

Add localization support

As I understand it, the error message code is not optimized to create localization. There is no great need for this, but it would be nice to add this feature too.

Just add "_ ()":

print(_("Triggered LinuxCNC E-Stop"))

Also need to be added at the beginning:

import locale 
import gettext

and something like this:

        locale.setlocale( locale.LC_ALL, '' )
        locale.bindtextdomain( "awlsim", LOCALEDIR )
        gettext.install( "awlsim", localedir = LOCALEDIR, unicode = True )
        gettext.bindtextdomain( "awlsim", LOCALEDIR )

L W [P#M 0.0, P#0.0] crashes

Trying to run L W [P#M 0.0, P#0.0] results in a crash, whereas the expected behaviour is to fail gracefully.

Stack trace:

AwlSimServer: Shutting down.
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 1207, in <module>
    sys.exit(AwlSimServer._execute())
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 207, in _execute
    server.runFromEnvironment(env)
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 309, in runFromEnvironment
    self.run()
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 1036, in run
    self.__handleCommunicationBlocking()
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 900, in __handleCommunicationBlocking
    self.__handleCommunication()
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 893, in __handleCommunication
    self.__handleSocketComm(rlist)
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 868, in __handleSocketComm
    self.__handleClientComm(self.__sock2client[sock])
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 858, in __handleClientComm
    handler(self, client, msg)
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 637, in __rx_RUNSTATE
    self.setRunState(self.STATE_RUN)
  File "/[...]/awlsim/awlsim/coreserver/server.py", line 335, in setRunState
    self.__sim.startup()
  File "/[...]/awlsim/awlsim/core/main.py", line 42, in profiled_wrapper
    func(self, *args, **kwargs)
  File "/[...]/awlsim/awlsim/core/main.py", line 55, in awlSimErrorExtension_wrapper
    func(self, *args, **kwargs)
  File "/[...]/awlsim/awlsim/core/main.py", line 190, in startup
    self.cpu.startup()
  File "/[...]/awlsim/awlsim/core/cpu.py", line 846, in startup
    self.prog.build()
  File "/[...]/awlsim/awlsim/core/cpu.py", line 317, in build
    self.__detectMnemonics()
  File "/[...]/awlsim/awlsim/core/cpu.py", line 177, in __detectMnemonics
    optrans.translateFromRawInsn(rawInsn)
  File "/[...]/awlsim/awlsim/core/optrans.py", line 671, in translateFromRawInsn
    opDesc = self.translateOp(rawInsn, rawOps)
  File "/[...]/awlsim/awlsim/core/optrans.py", line 627, in translateOp
    self.__translateAddressOperator(opDesc, rawOps[1:])
  File "/[...]/awlsim/awlsim/core/optrans.py", line 345, in __translateAddressOperator
    self.__translateIndirectAddressing(opDesc, rawOps[1:])
  File "/[...]/awlsim/awlsim/core/optrans.py", line 299, in __translateIndirectAddressing
    assert(offsetOpDesc.fieldCount == end)
AssertionError

Error message on client and server

Is it possible to do precompilation on the client side? A commonplace error in the name causes a stop CPU and there are no error messages on the client side.

awlsim-linuxcnc: [133.250] Awlsim error:
  Multiple definitions of FC 1.

When you load an STL file, the error is at least highlighted in red, but when you work in FBD there are no messages or highlighting.
Also, the FBD source file is not indicated in the error, which greatly complicates the search.

awlsim-linuxcnc: [1919.813] Awlsim error:
  Unconnected pin "Q" found in FUP element XOR(x3/y10, 2c096344..65166).
The reporting FUP/FBD element is:
FUP-grid

If there is no way to precompile on the client, is there a way to display the error in the server GUI?

Incorrect handling of STW OR bit

The handling of the STW OR bit is partially incorrect in U, UN, O, ON, X, XN, U(, UN(, O(, ON(, X( and XN( instructions.

This can lead to incorrect AWL program execution, if AND-before-OR (UND vor ODER) logic is used.
Programs that do not contain a plain O instruction (O instruction without operands) are not affected.

This will be fixed in awlsim-0.65.0

break at remove rpigpio in the Hardware module setup

Hello,

have copy the soure from the homepage, unzip and start awlsim-win.cmd (use W7), python3 and pyqt5 is already install.

Opening the Hardware module setup, add rpigpio and remove, test it with add 3 times and remove one.
Program quit and show this:

awlsim-0.47>py -3 -O awlsim-gui
awlsim-gui: Using PyQt5 GUI framework
Traceback (most recent call last):
  File "C:\Users\mhackspacher\Downloads\awlsim-0.47\awlsim\gui\hwmodconfig.py",line 357, in __handleDel
    self.__loadedModDescs.remove(modDesc)
  File "C:\Users\mhackspacher\Downloads\awlsim-0.47\awlsim\common\hwmod.py", line 117, in __eq__
    return self.getIdentHash() == other.getIdentHash()
  File "C:\Users\mhackspacher\Downloads\awlsim-0.47\awlsim\common\hwmod.py", line 109, in getIdentHash
    h.update(pValue.encode("utf-8", "ignore"))
AttributeError: 'NoneType' object has no attribute 'encode'

RESOLVED! Error running setup.py from the unzipped folder, also error running linuxcnc demo may be related

Here's what I get:

cnc@linuxcnc:~/Desktop/awlsim-0.74.0$ python setup.py
WARNING: Could not build the CYTHON modules: Cython 2 not supported. Please use Cython 3.
Skipping build of CYTHON modules.
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied
cnc@linuxcnc:~/Desktop/awlsim-0.74.0$ 

app dependencies were installed from the github zip

I also have the following report after an error running linuxcnc with the example files:

Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.8.0
Machine configuration directory is "/home/cnc/linuxcnc/configs/test_all_demo_files"
Machine configuration file is "test_all_demo_files.ini"
INIFILE=/home/cnc/linuxcnc/configs/test_all_demo_files/test_all_demo_files.ini
VERSION=1.1
PARAMETER_FILE=emc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=XYZ
KINEMATICS=trivkins coordinates=XYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Found file(REL): ./linuxcnc-demo.hal
Found file(REL): ./awlsim.hal
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
Unexpected realtime delay on task 0 with period 20000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
./awlsim.hal:25: execv(awlsim-linuxcnc-hal): No such file or directory
./awlsim.hal:25: waitpid failed awlsim-linuxcnc-hal awlsim
./awlsim.hal:25: awlsim-linuxcnc-hal exited without becoming ready
3964
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime



-----------------------------------------------------------------------
Info report created by linuxcnc_info:
The file:    /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
     http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.

                Date: Thu 10 Jun 2021 11:36:30 AM EDT
            UTC Date: Thu 10 Jun 2021 03:36:30 PM UTC
        this program: /usr/bin/linuxcnc_info
              uptime: 11:36:30 up 1:03, 1 user, load average: 0.02, 0.04, 0.08
     lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
      which linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/cnc/linuxcnc/configs/test_all_demo_files
                USER: cnc
             LOGNAME: cnc
                HOME: /home/cnc
              EDITOR: 
              VISUAL: 
            LANGUAGE: 
                TERM: dumb
           COLORTERM: 
             DISPLAY: :0.0
             DESKTOP: lightdm-xsession
        display size: 800x600 pixels (211x158 millimeters)
                PATH: /usr/bin:/home/cnc/linuxcnc/configs/test_all_demo_files/bin:/usr/bin:/home/cnc/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: linuxcnc
      kernel-name -s: Linux
      kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.146-1 (2020-09-17)
          machine -m: x86_64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/boot/vmlinuz-4.19.0-11-rt-amd64 root=UUID=9457fa4f-82b8-4c33-8384-2ef2f2f77780 ro initrd=/install/gtk/initrd.gz quiet
          model name: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
               cores: 1
             cpu MHz: 3400.030
             parport: 
              serial: 

Versions:
                 gcc: gcc (Debian 8.3.0-6) 8.3.0
              python: Python 2.7.16
                 git: git version 2.20.1
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: not_in_PATH
          glade-gtk2: not_in_PATH

linuxcnc_var all:

     LINUXCNCVERSION: 2.8.0
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /etc/init.d/realtime
                 RTS: uspace
          HALLIB_DIR: /usr/share/linuxcnc/hallib

dpkg -l "*linuxcnc*":
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version      Architecture Description
+++-===================-============-============-=====================================================================
un  linuxcnc            <none>       <none>       (no description available)
un  linuxcnc-dev        <none>       <none>       (no description available)
un  linuxcnc-doc        <none>       <none>       (no description available)
ii  linuxcnc-doc-cn     1:2.8.0      all          motion controller for CNC machines and robots (Chinese
ii  linuxcnc-doc-en     1:2.8.0      all          motion controller for CNC machines and robots (English documentation)
ii  linuxcnc-doc-es     1:2.8.0      all          controlador de movimiento para máquinas CNC y robots (Español).
ii  linuxcnc-doc-fr     1:2.8.0      all          motion controller for CNC machines and robots (French documentation)
un  linuxcnc-sim        <none>       <none>       (no description available)
un  linuxcnc-sim-dev    <none>       <none>       (no description available)
ii  linuxcnc-uspace     1:2.8.0      amd64        motion controller for CNC machines and robots
ii  linuxcnc-uspace-dev 1:2.8.0      amd64        PC based motion controller for real-time Linux

This should be my operating system info:

The file:    /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
     http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.

                Date: Thu 10 Jun 2021 11:36:30 AM EDT
            UTC Date: Thu 10 Jun 2021 03:36:30 PM UTC
        this program: /usr/bin/linuxcnc_info
              uptime: 11:36:30 up 1:03, 1 user, load average: 0.02, 0.04, 0.08
     lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
      which linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/cnc/linuxcnc/configs/test_all_demo_files
                USER: cnc
             LOGNAME: cnc
                HOME: /home/cnc
              EDITOR: 
              VISUAL: 
            LANGUAGE: 
                TERM: dumb
           COLORTERM: 
             DISPLAY: :0.0
             DESKTOP: lightdm-xsession
        display size: 800x600 pixels (211x158 millimeters)
                PATH: /usr/bin:/home/cnc/linuxcnc/configs/test_all_demo_files/bin:/usr/bin:/home/cnc/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: linuxcnc
      kernel-name -s: Linux
      kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.146-1 (2020-09-17)
          machine -m: x86_64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/boot/vmlinuz-4.19.0-11-rt-amd64 root=UUID=9457fa4f-82b8-4c33-8384-2ef2f2f77780 ro initrd=/install/gtk/initrd.gz quiet
          model name: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
               cores: 1
             cpu MHz: 3400.030
             parport: 
              serial: 

Versions:
                 gcc: gcc (Debian 8.3.0-6) 8.3.0
              python: Python 2.7.16
                 git: git version 2.20.1
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: not_in_PATH
          glade-gtk2: not_in_PATH

linuxcnc_var all:

     LINUXCNCVERSION: 2.8.0
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /etc/init.d/realtime
                 RTS: uspace
          HALLIB_DIR: /usr/share/linuxcnc/hallib

dpkg -l "*linuxcnc*":
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version      Architecture Description
+++-===================-============-============-=====================================================================
un  linuxcnc            <none>       <none>       (no description available)
un  linuxcnc-dev        <none>       <none>       (no description available)
un  linuxcnc-doc        <none>       <none>       (no description available)
ii  linuxcnc-doc-cn     1:2.8.0      all          motion controller for CNC machines and robots (Chinese
ii  linuxcnc-doc-en     1:2.8.0      all          motion controller for CNC machines and robots (English documentation)
ii  linuxcnc-doc-es     1:2.8.0      all          controlador de movimiento para máquinas CNC y robots (Español).
ii  linuxcnc-doc-fr     1:2.8.0      all          motion controller for CNC machines and robots (French documentation)
un  linuxcnc-sim        <none>       <none>       (no description available)
un  linuxcnc-sim-dev    <none>       <none>       (no description available)
ii  linuxcnc-uspace     1:2.8.0      amd64        motion controller for CNC machines and robots
ii  linuxcnc-uspace-dev 1:2.8.0      amd64        PC based motion controller for real-time Linux

I do have the newer python installed but that file shows the older one

Non-English names are not displayed in the compiler window

Non-English names are not displayed in the compiler window.
Instead of words it turns out "____".

// 
// FUNCTION generated by Awlsim FUP compiler
// 
// Source            : 123 ____ 
// Compiler version  : 0.73.0-pre
// AWL mnemonics     : DE (German)
// Optimizers        : grid-1: biefwd, lblrem, noprem
// 
FUNCTION FC 1 : VOID
	TITLE   = 123 ____ 
	FAMILY  : FUP
	VERSION : 0.73.0-pre
BEGIN
        BE;
END_FUNCTION

Add the ability to embed the application

Now I am making the Linuxcnc GUI on pyqt and want to embed awlsim in one of the tabs.
But starting with this code leads to a number of errors or freezes:

from awlsim.gui.mainwindow import *
class AwlsimWidget(QWidget):
    def __init__(self, parent=None, path=None):
        QWidget.__init__(self, parent)
        try:
            mainwnd = MainWindow.start()
            layout = QHBoxLayout()
            layout.addWidget(mainwnd)
            self.setLayout(layout)
        except Exception as e:
            printDebug(_("Failed to import awlsim, {}",e))

Can you add a parameter to start awlism process in the window?
Like this:

self.process = QtCore.QProcess(self)
self.process.start('xterm',['-into', str(int(self.winId())), '-geometry', "600x60+0+400"])

Add tooltips and autocomplete when entering a field in GUI

I did not find this items in the todo list, but it would greatly simplify the work:

  • In the "Symbols" table in the "Symbol" column, you can make a hint for the names entered above, for example, as in the MS Excell tables, and in the "Data type" column, type auto-completion by the first letter entered.

  • Also, when editing the operand name in the FBD scheme, it would be nice to have a name hint from the "Symbols" tables.

  • If this is very difficult, then you can make the operand name be copied or pasted immediately with quotation marks or pound.

  • Also, I did not find how to enter constants besides creating a memory flag. In the examples there is "L # 65000" as far as I understand it passes a 32 bit variable, but how do I pass a boolean?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.