Comments (11)
I use Python 3.10.5
from pylsv2.
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.
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.
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.
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.
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.
thanks for the reply
whether with or without the "safe_mode" I systematically get an error
from pylsv2.
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.
from pylsv2.
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.
https://www.inventcom.net/s1/_pdf/Heidenhain_TNC_Machine_Data.pdf
from pylsv2.
Related Issues (20)
- LSV2 transfer protocol HOT 3
- Cann't connect to the Haidenhain system (version TNC640) HOT 2
- Can we get the symbol name through the PLC address? HOT 9
- Integrated Oscilloscope in iTNC530 HOT 39
- Exception: AttributeError: module 'pyLSV2' has no attribute 'xxyyzzxxyyzz' HOT 2
- signals at long & short intervals together HOT 3
- Reading PLC memory via memory address returns different values than reading via data path HOT 13
- Integrated Oscilloscope in TNC640 HOT 8
- i cannot read all the plc variables HOT 1
- System Parameters: Incorrect variable used for default initialization HOT 1
- iTNC 530 get_error_messages inconsistent? HOT 5
- memory loss and feedback HOT 4
- an error occurred while querying system information HOT 2
- File not Found Error
- How to locate Q parameters values HOT 3
- unexpected response 'RSP.T_BD' HOT 8
- table_reader ERROR:NCTable parser:File has invalid utf-8 encoding HOT 2
- Announcement of the discontinuation of the LSV2 protocol HOT 1
- pyLSV2.err.LSV2InputException: highest address is 15000 but address of last requested element is 26733 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylsv2.