<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to filter frames with CANBus API ?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a2d04269f2/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a2d04269f2/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/a2d04269f2/</id><updated>2022-06-03T09:59:39.680000Z</updated><subtitle>Recent posts to How to filter frames with CANBus API ?</subtitle><entry><title>How to filter frames with CANBus API ?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a2d04269f2/?limit=25#5870/d511" rel="alternate"/><published>2022-06-03T09:59:39.680000Z</published><updated>2022-06-03T09:59:39.680000Z</updated><author><name>paulpotat</name><uri>https://forge.codesys.com/u/paulpotat/</uri></author><id>https://forge.codesys.comaca8af45155c06c8abd289905c1c353748bd5893</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you for your answer, it works perfectly fine now ! &lt;/p&gt;
&lt;p&gt;I think I also made a mistake by using a 11 bit driver while some of the IDs on the bus are 29 bits.&lt;br/&gt;
However the 11 bit driver works with 29 bits ID somehow ? How is this possible ? &lt;/p&gt;
&lt;p&gt;Also I didn't know the website &lt;strong&gt;&lt;em&gt;helpme-codesys.com&lt;/em&gt;&lt;/strong&gt;, what's the difference with &lt;strong&gt;&lt;em&gt;help.codesys.com&lt;/em&gt;&lt;/strong&gt; ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to filter frames with CANBus API ?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a2d04269f2/?limit=25#5870" rel="alternate"/><published>2022-06-03T09:18:44.001000Z</published><updated>2022-06-03T09:18:44.001000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.comf7bb3207173225cdd376a2d048e1bd44bc47aa3c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;As you have a long ID, you should set the x29BitIdValue and Mask to TRUE.&lt;/p&gt;
&lt;p&gt;The mask works in a way that if you set the bit to 1, that it should exactly match the bit in the received message. If you set this to 0, then you don't care. So if you set the mask to 16#1FFFFFFF (29 bits bit true, so should exactly match the dwIdValue), then you should only see the message you want to see. For more information see: &lt;a href="https://content.helpme-codesys.com/en/libs/CAA%20Can%20Low%20Level%20Extern/Current/CAN-Low-Level/Functions/Basic-Functions/CreateMaskReceiver.html" rel="nofollow"&gt;https://content.helpme-codesys.com/en/libs/CAA%20Can%20Low%20Level%20Extern/Current/CAN-Low-Level/Functions/Basic-Functions/CreateMaskReceiver.html&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to filter frames with CANBus API ?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a2d04269f2/?limit=25#e641" rel="alternate"/><published>2022-06-01T09:07:49.156000Z</published><updated>2022-06-01T09:07:49.156000Z</updated><author><name>paulpotat</name><uri>https://forge.codesys.com/u/paulpotat/</uri></author><id>https://forge.codesys.comaf3b9afa8a197fdb08d98e852b3bf167aaa56334</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everyone,&lt;/p&gt;
&lt;p&gt;I'm trying to use the CANBus API I found in the CodeSys Store (documentation &lt;a class="" href="https://us.store.codesys.com/media/n98_media_assets/files/000030-F/0/CANBus%20Example_en.pdf" rel="nofollow"&gt;here&lt;/a&gt;) but I can't figure out how the filtering process works.&lt;/p&gt;
&lt;p&gt;I have a CAN bus with 2 devices and I want to only receive the messages containing a specific ID (10614061). I thought it was possible using the receiver mask object of the CANBus API but I don't understand what I'm supposed to write in the parameters values...&lt;/p&gt;
&lt;p&gt;FYI I'm running the base example given in the CANBus API and I only tried modifying the mask configuration like this :&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c"&gt;(* Defines a mask for the receiver *)&lt;/span&gt;
&lt;span class="n"&gt;maskConfig&lt;/span&gt;      &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CAN&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RECEIVER_MASK&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;
                                    &lt;span class="n"&gt;dwIdValue&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="mi"&gt;10614061&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;dwIdMask&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;xRTRValue&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; 
                                    &lt;span class="n"&gt;xRTRMask&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;x29BitIdValue&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;x29BitIdMask&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;xTransmitValue&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; 
                                    &lt;span class="n"&gt;xTransmitMask&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;xAlwaysNewest&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="n"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;However I'm still receiving all the messages going through the CAN bus, it doesn't filter anything.&lt;/p&gt;
&lt;p&gt;What am I doing wrong ?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>