Reading value of pin in g code

More
9 years 7 months ago - 9 years 7 months ago #90419 by Radek
Replied by Radek on topic Reading value of pin in g code

andypugh wrote: It can't be stopping at line 4. It is executing line 8.


Yes, you're right. I made a test, just left one if and programme missed this loop. It goes from 8th step to 30th... altough that P11=%Q11=s1 has a high state. What's wrong ?
Attachments:
Last edit: 9 years 7 months ago by Radek.

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #90423 by andypugh
Replied by andypugh on topic Reading value of pin in g code
Can you attach the G-code file, so far we have only seen it as a screen-shot.

Can you have a halmeter look at the actual value of motion.digital-in-11 (and 12, and 13) rather than assuming that the HAL net is working?

Did you increase the number of digital inputs in the loadrt motmod line?

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago - 9 years 7 months ago #90424 by Radek
Replied by Radek on topic Reading value of pin in g code
Hal meter shows that Q11 etc. is TRUE.
I changed L0 to L3 for some tests.

File Attachment:

File Name: hal.txt
File Size:2 KB

File Attachment:

File Name: postgui_hal.txt
File Size:2 KB

File Attachment:

File Name: ngc_2017-03-28.txt
File Size:1 KB
Attachments:
Last edit: 9 years 7 months ago by Radek.

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #90426 by andypugh
Replied by andypugh on topic Reading value of pin in g code
Can you insert a (debug, line-no #5399) before each "if" to see what the actual value being used is?

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago - 9 years 7 months ago #90427 by Radek
Replied by Radek on topic Reading value of pin in g code
I saw that when the 4th line is running then one of chosen pins P11,12,13 works correct, but only once and after this i can't do anything.
Attachments:
Last edit: 9 years 7 months ago by Radek.

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #90429 by Radek
Replied by Radek on topic Reading value of pin in g code
That's how my code looks like at this moment. Loop works ONLY when the last step is running. It means that when line 23, 43, 62 is executed i need to set high state on P11,12 or 13 and then it works...

File Attachment:

File Name: ngc.txt
File Size:2 KB
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.493 seconds
Powered by Kunena Forum