Discussion:
[Machinekit] Mesa 6i25 Smart Serial ports work with halcmd HAL-file, but not with python-HAL
d***@gmail.com
2018-11-28 14:01:32 UTC
Permalink
Hello everyone,
we have the following problem with machinekit (latest version from
repositories, debian stretch):

If we launch machinekit with an original (linuxcn-style) HAL-file:

loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_stepgens=4
sserial_port_0=00xxxxxx "

we can read out a 7i76-daughterboard digital in pin via halmeter.

On the other hand, if we use a python-HAL:

rt.loadrt('hostmot2')
rt.loadrt('hm2_pci', config=' num_encoders=1 num_stepgens=4
sserial_port_0=00xxxxxx')

halmeter shows the pins, but they show only false, regardless of the actual
input value.

Do you have any ideas?

Best regards
Dennis
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+***@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
Bas de Bruijn
2018-11-28 15:19:43 UTC
Permalink
Post by d***@gmail.com
Hello everyone,
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_stepgens=4 sserial_port_0=00xxxxxx "
we can read out a 7i76-daughterboard digital in pin via halmeter.
rt.loadrt('hostmot2')
rt.loadrt('hm2_pci', config=' num_encoders=1 num_stepgens=4 sserial_port_0=00xxxxxx')
halmeter shows the pins, but they show only false, regardless of the actual input value.
Which pins are that?

What does `halcmd show pin hm2_5i25.0` say?
Post by d***@gmail.com
Do you have any ideas?
Have you inspected /var/log/linuxcnc.log after setting `export DEBUG=5` in the terminal you run your python file?

Have you added the read, write and pet_watchdog functions to your thread?

Have you started the thread?

Bas
Post by d***@gmail.com
Best regards
Dennis
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+***@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
d***@gmail.com
2018-11-28 20:32:41 UTC
Permalink
Thank you so much Bas,
indeed we forgot to add the write and watchdog functions to our thread!

Best regards
Dennis
Post by d***@gmail.com
Hello everyone,
we have the following problem with machinekit (latest version from
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_stepgens=4
sserial_port_0=00xxxxxx "
we can read out a 7i76-daughterboard digital in pin via halmeter.
rt.loadrt('hostmot2')
rt.loadrt('hm2_pci', config=' num_encoders=1 num_stepgens=4
sserial_port_0=00xxxxxx')
halmeter shows the pins, but they show only false, regardless of the actual input value.
Which pins are that?
What does `halcmd show pin hm2_5i25.0` say?
Do you have any ideas?
Have you inspected /var/log/linuxcnc.log after setting `export DEBUG=5` in
the terminal you run your python file?
Have you added the read, write and pet_watchdog functions to your thread?
Have you started the thread?
Bas
Best regards
Dennis
--
https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+***@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
Bas de Bruijn
2018-11-28 20:51:56 UTC
Permalink
Post by d***@gmail.com
Thank you so much Bas,
indeed we forgot to add the write and watchdog functions to our thread!
Great!
Post by d***@gmail.com
Best regards
Dennis
Post by Bas de Bruijn
Post by d***@gmail.com
Hello everyone,
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_stepgens=4 sserial_port_0=00xxxxxx "
we can read out a 7i76-daughterboard digital in pin via halmeter.
rt.loadrt('hostmot2')
rt.loadrt('hm2_pci', config=' num_encoders=1 num_stepgens=4 sserial_port_0=00xxxxxx')
halmeter shows the pins, but they show only false, regardless of the actual input value.
Which pins are that?
What does `halcmd show pin hm2_5i25.0` say?
Post by d***@gmail.com
Do you have any ideas?
Have you inspected /var/log/linuxcnc.log after setting `export DEBUG=5` in the terminal you run your python file?
Have you added the read, write and pet_watchdog functions to your thread?
Have you started the thread?
Bas
Post by d***@gmail.com
Best regards
Dennis
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+***@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
Loading...