Coder Social home page Coder Social logo

Few question about pylsv2 HOT 11 CLOSED

drunsinn avatar drunsinn commented on May 14, 2024
Few question

from pylsv2.

Comments (11)

Baptou88 avatar Baptou88 commented on May 14, 2024 1

I use Python 3.10.5

from pylsv2.

drunsinn avatar drunsinn commented on May 14, 2024

Hello @Baptou88,

The first warning might not actually be a problem. While establishing the connection pyLSV2 reads some version parameters from the control. Depending on the software version on the control some of these parameters aren't implemented which results in this error message. The logging as a whole isn't very well done, I hope to make it a lot better with a new major version.

Have you tried the user MONITOR without a password? At least on the controls I tested no password was required.
You can take a look at the unit test in test_keys.py.

from pylsv2.

Baptou88 avatar Baptou88 commented on May 14, 2024

Hello,
Thank you for your reply !

I just tried again without specifying a password, I get this message:

INFO:root:login executed successfully for login Login.MONITOR DEBUG:root:telegram to transmit: command CMD.C_LK payload length 1 bytes data: bytearray(b'\x00\x00\x00\x01C_LK\x00') DEBUG:root:command CMD.C_LK executed successfully, received T_OK without any payload DEBUG:root:command to unlock keyboard was successful DEBUG:root:telegram to transmit: command CMD.C_EK payload length 2 bytes data: bytearray(b'\x00\x00\x00\x02C_EK\x01\xc0') WARNING:root:T_ER or T_BD received, an error occurred during the execution of the last command: LSV2_ERROR_T_ER_FONT_NOT_DEFINED WARNING:root:an error occurred while sending the key code 448

from pylsv2.

drunsinn avatar drunsinn commented on May 14, 2024

Ok, so the login worked but the button press is not recognized.

This is something that came to my attention just recently by reading the documentation provided in #34. It has a list of completely different key codes. The control you are communicating with probably expects one of these key codes. Why the error message is talking about fonts is a bit strange though.

I am currently working on incorporating the findings from this document into pyLSV2. In the meantime here are some key codes you could try:

MODE_MANUAL = 0x0048  # was 0x01C0
MODE_AUTOMATIC = 0x004B # was 0x01C3
MOD_DIALOG = 0x0042 # was 0x01C7

UPPER_A = 0x4150
UPPER_B = 0x4250
UPPER_C = 0x4350

NUMBER_0 = 0x3050
NUMBER_1 = 0x3150
NUMBER_2 = 0x3250
NUMBER_9 = 0x3950

If you could check if these work as expected I can go ahead an add them as a new enum with a second set of key codes!

from pylsv2.

Baptou88 avatar Baptou88 commented on May 14, 2024

for some time now I have not been able to log in with lsv2.login(login=pyLSV2.Login.MONITOR), even with freshly installed itnc 530

from pylsv2.

drunsinn avatar drunsinn commented on May 14, 2024

This was caused by an mistake on my side. I accidentally removed the login MONITOR from the list of allowed logins in safe mode.

Version 0.7.6 with a fix should be available soon.

from pylsv2.

Baptou88 avatar Baptou88 commented on May 14, 2024

thanks for the reply

whether with or without the "safe_mode" I systematically get an error

from pylsv2.

Baptou88 avatar Baptou88 commented on May 14, 2024

I finally managed to connect, here is what I did:

first in the PLC:/oem.sys file I uncommented the line "REMOTE.LOCKSOFTKEYVISIBLE = YES"

secondly in PGM edit mode click "MOD" then set "External access" to true

and third, completely restart itnc

from pylsv2.

Baptou88 avatar Baptou88 commented on May 14, 2024

image

from pylsv2.

drunsinn avatar drunsinn commented on May 14, 2024

Interesting, the exact same programming station works for me and I cant remember changing anything in *.sys files.

I will add a FAQ section to the readme and list your steps for everyone to find.

BTW: which version of python are you using? I am working on a rewrite for a version 1.0, the minimal required version will most likely be 3.7 because I want to use dataclasses for all the dictionaries. The API will probably also change as it is quite a mess at the moment.

from pylsv2.

Baptou88 avatar Baptou88 commented on May 14, 2024

https://www.inventcom.net/s1/_pdf/Heidenhain_TNC_Machine_Data.pdf

from pylsv2.

Related Issues (20)

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.