<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>If statement for macro trigger in RRF</title>
        <description> Hello,
I need help with syntax. I have duet 2 board with RRF.
I have a button that calls trigger2.g
So far this is ok.

I have a filament runout sensor switch connected to zstop.
Depending on the state of the sensor I either want to start filament loading or filament unloading.
So if it is triggered unload the filament, if not triggered start loading the filament. The sensor is right at the extruder so it is a good indication of which gcode to start upon button press.

How is my if statement will look like?
if sensors.???.triggered
  ;unload gcode
else
  ;load gcode
endif

Thank you</description>
        <link>https://reprap.org/forum/read.php?146,893793,893793#msg-893793</link>
        <lastBuildDate>Fri, 04 Sep 2026 13:57:12 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?146,893793,893804#msg-893804</guid>
            <title>Re: If statement for macro trigger in RRF</title>
            <link>https://reprap.org/forum/read.php?146,893793,893804#msg-893804</link>
            <description><![CDATA[ I see that your similar question at [<a href="https://forum.duet3d.com/topic/34140/if-statement-for-macro-trigger-in-rrf" target="_blank"  rel="nofollow">forum.duet3d.com</a>] has been answered.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Firmware - mainstream and related support</category>
            <pubDate>Sat, 18 Nov 2023 02:01:20 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?146,893793,893793#msg-893793</guid>
            <title>If statement for macro trigger in RRF</title>
            <link>https://reprap.org/forum/read.php?146,893793,893793#msg-893793</link>
            <description><![CDATA[ Hello,<br />
I need help with syntax. I have duet 2 board with RRF.<br />
I have a button that calls trigger2.g<br />
So far this is ok.<br />
<br />
I have a filament runout sensor switch connected to zstop.<br />
Depending on the state of the sensor I either want to start filament loading or filament unloading.<br />
So if it is triggered unload the filament, if not triggered start loading the filament. The sensor is right at the extruder so it is a good indication of which gcode to start upon button press.<br />
<br />
How is my if statement will look like?<br />
if sensors.???.triggered<br />
  ;unload gcode<br />
else<br />
  ;load gcode<br />
endif<br />
<br />
Thank you]]></description>
            <dc:creator>daninet</dc:creator>
            <category>Firmware - mainstream and related support</category>
            <pubDate>Thu, 16 Nov 2023 13:34:37 -0500</pubDate>
        </item>
    </channel>
</rss>
