Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to locate Q parameters values #57

Open
LanderUrgoiti opened this issue Nov 23, 2023 · 3 comments
Open

How to locate Q parameters values #57

LanderUrgoiti opened this issue Nov 23, 2023 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@LanderUrgoiti
Copy link

Hello everyone:

I am trying to locate a certain memory adress in the PLC of a Heidenhain TNC 640 but I can't.
My main problem is that I cannot make sense of the order in wich the read_plc_memory() method sorts the data.
For example:

I know I can find the PLC memory that I store in the machine as Q1620 using this line of code:

PN = con.read_plc_memory(first_element=250,mem_type=pyLSV2.lc.MemoryType.INPUT_WORD, number_of_elements=1)

The data I am looking for is stored in the Q107 in the machine.
Obviously there are not enough elements in the INPUT_WORD MemoryType to go from Q1620 back to Q107.
I guess it is stored in another MemoryType but I have not found it.

Maybe I could list all of the PLC values so i can search for it but I do not know how.
Can you please give me any tip?

Thanks in advance

@LanderUrgoiti
Copy link
Author

I have realised I may have been wrong with something.
The "Q" parameters I am looking for are not written in the PLC and maybe this is why I cant find them.

Is it possible to get the value of these parameters?
I am trying with the get_machin_parameters() method but i am not making any progress.

I dont know if any of you know how these "Q" parameters are named.

@LanderUrgoiti LanderUrgoiti changed the title How to locate PLC memory adress How to locate Q parameters values Nov 24, 2023
@drunsinn
Copy link
Owner

I am not aware of any function to read from the Q parameter memory using lsv2.
Depending on what you are trying to do it might also work if you write the q parameter to a table. Those can be copied with lsv2 and the values read directly

@drunsinn drunsinn self-assigned this Nov 27, 2023
@drunsinn drunsinn added the question Further information is requested label Nov 27, 2023
@LanderUrgoiti
Copy link
Author

LanderUrgoiti commented Nov 28, 2023

Hello @drunsinn
First of all, thanks for the response.
I thought it would have a simple solution to read the Q parameters since they are very used to handle process variables.
I guess I will either write these data in a table or directly to the PLC.
If you find a way to read these parameters I would be glad to know! We have a lot of info stored in these parameters!!

Thanks again!
Lander
imagen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants