G-Code to read input pins, needed for OpenPnP

162 views
Skip to first unread message

jjg

unread,
Aug 4, 2017, 4:46:52 PM8/4/17
to Smoothieware Support
Switch config allow input pins to trigger G-Code. I don't want to have input pins trigger G-Code.
OpenPnP issues command to read things like vacuum sensors at various stages of processing.

If I use M105, then I can only read one variable.
I have 3 digital input pins to read (2 vacuum sensors and Pin Down Sensor).
Later will want to read 2 additional analog pins.

Can I do this in config or do I need to code a custom command?

jjg

unread,
Aug 4, 2017, 7:00:03 PM8/4/17
to Smoothieware Support
Check out commercial PnP converted to Smoothie.  
Well almost, I need to know how to read in G-code 3 sensors.

Any help would be appreciated. 
20170804_175651[1].jpg

Arthur Wolf

unread,
Aug 5, 2017, 5:04:45 AM8/5/17
to Smoothieware Support
use the "switch" command : "switch switch_name"

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

jjg

unread,
Aug 5, 2017, 8:00:41 AM8/5/17
to Smoothieware Support
In the command line of pronterface, I type
>>>switch.vac1read
*** Unknown syntax: switch.vac1read


the config file is
switch.vac1read.enable                           true             #
switch.vac1read.input_pin                       3.26              #
switch.vac1read.input_type                      digital          #

I need something like
>>>M105
SENDING
:M105
ok B
:inf /0.0 @0

This way OpenPnP can read status of vacuum after pickup.
OpenPnP guys suggest Arduino addon but there are more than enough pins on the smoothie.

Regards,
John

Arthur Wolf

unread,
Aug 5, 2017, 8:23:31 AM8/5/17
to Smoothieware Support
using the very latest edge firmware ?
also you put a dot there, where there shouldn't be one
also pronterface eats commands it doesn't know, so you really need to send "@switch vac1read"


To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

jjg

unread,
Aug 5, 2017, 9:10:45 AM8/5/17
to Smoothieware Support
Thank you for the help.

Just purchased 2 Smoothieboards a few weeks ago, so very new to smoothie.
So startup fog is very thick.
Completed all the wiring of the PnP and it works :).  Noticed steppers are quieter with smoothie vs original controller. :)

I don't see a revision # in any of the files on the sd card. How do I get the revision number?

This is what I get when entering the command 
>>>@switch vac1read
SENDING
:switch vac1read
switch vac1read set to:
>>>@switch vac2read
SENDING
:switch vac2read
switch vac2read set to:

Regards,
John

To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Arthur Wolf

unread,
Aug 5, 2017, 9:12:20 AM8/5/17
to Smoothieware Support
On Sat, Aug 5, 2017 at 3:10 PM, jjg <john.j....@gmail.com> wrote:
Thank you for the help.

Just purchased 2 Smoothieboards a few weeks ago, so very new to smoothie.
So startup fog is very thick.
Completed all the wiring of the PnP and it works :).  Noticed steppers are quieter with smoothie vs original controller. :)

I don't see a revision # in any of the files on the sd card. How do I get the revision number?

"version" command
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jjg

unread,
Aug 5, 2017, 9:16:17 AM8/5/17
to Smoothieware Support
In reading the doc, I missed the comment about "@" in front of commands in prontface. Now I can get the console commands to work :)

>>>@version
SENDING:version
Build version: edge-8e4a64c, Build date: Apr 24 2017 11:46:31, MCU: LPC1769, System Clock: 120MHz
5 axis

Arthur Wolf

unread,
Aug 5, 2017, 9:17:31 AM8/5/17
to Smoothieware Support
well that's pretty old, as I said please use the very latest version of both config and firmware. documentation makes it clear you should do that before asking any question or trying to debug anything, anyway.

To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jjg

unread,
Aug 5, 2017, 9:29:30 AM8/5/17
to Smoothieware Support
The intro in the documentation has the statement
Note, Smoothieboards come completely pre-flashed, you do not need to compile or flash the firmware, unless you want to upgrade to a newer version, or to contribute to the code.

Does it make sense to update this to something like?
Note, Smoothieboards come completely pre-flashed, you do not need to compile or flash the firmware, unless you want to upgrade to a newer version, to contribute to the code, or ask for help in the support forum.

Upgrading now will let you know if it works.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jjg

unread,
Aug 5, 2017, 10:31:09 AM8/5/17
to Smoothieware Support
That did the trick. Thanks a million.

>>>@version
SENDING
:version
Build version: upstreamedge-b6153da, Build date: Jun 21 2017 21:02:36, MCU: LPC1769, System Clock: 120MHz
5 axis


>>>@switch pinread
SENDING
:switch pinread
switch pinread is 0


>>>@switch vac2read
SENDING
:switch vac2read
switch vac2read is 0


>>>@switch vac1read
SENDING
:switch vac1read
switch vac1read is 0


Regards,
John

Satya Gupta

unread,
Jul 10, 2024, 4:36:06 AM (8 days ago) Jul 10
to Smoothieware Support
Hey John,

I know this is very old conversation, but i have recently planned to convert same machine TVM802 into open PNP.

Just checking if i would be able to get any help from you. 

Reply all
Reply to author
Forward
0 new messages