<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to read data from CAN device using Codesys?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/88b6acc8fa/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/88b6acc8fa/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/88b6acc8fa/</id><updated>2021-02-26T14:27:13.526000Z</updated><subtitle>Recent posts to How to read data from CAN device using Codesys?</subtitle><entry><title>How to read data from CAN device using Codesys?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/88b6acc8fa/?limit=25#ff5e" rel="alternate"/><published>2021-02-26T14:27:13.526000Z</published><updated>2021-02-26T14:27:13.526000Z</updated><author><name>sgronchi</name><uri>https://forge.codesys.com/u/sgronchi/</uri></author><id>https://forge.codesys.comb4d8b358345a668a6510cd8a56cd1d48f3bbc495</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Your code tries to SDO read an object from the local node (DEVICE = 0), but you have not created a CANopen local device.&lt;/p&gt;
&lt;p&gt;In any case, you seem not to have clear the distinction between CAN (the bus) and CANopen (one of the various application protocol built on top of CAN).&lt;/p&gt;
&lt;p&gt;In particular, your message is illegal to use in a CANopen network: the only message that can have ID 1 is the Global Failsafe Command (GFC) that has DLC 0 (thus no payload), that has a very special meaning. It is however totally fine to use that message in a CAN network without CANopen nodes.&lt;/p&gt;
&lt;p&gt;If you want to interface with CAN at low level, check the related library: &lt;a href="https://help.codesys.com/webapp/hGcF55fadXXw7LxTlfIUoErJcVQ%2Ffld-CAN-Low-Level;product=CAA_CanL2_Extern;version=3.5.16.0" rel="nofollow"&gt;https://help.codesys.com/webapp/hGcF55fadXXw7LxTlfIUoErJcVQ%2Ffld-CAN-Low-Level;product=CAA_CanL2_Extern;version=3.5.16.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to set up a CANopen network, try to understand CANopen foundations and its allocation of CAN addresses, and only then try to simulate a device.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to read data from CAN device using Codesys?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/88b6acc8fa/?limit=25#5afd" rel="alternate"/><published>2021-02-25T18:31:38.464000Z</published><updated>2021-02-25T18:31:38.464000Z</updated><author><name>rariusz</name><uri>https://forge.codesys.com/u/rariusz/</uri></author><id>https://forge.codesys.com659b2f2c69ec4dcebd9359d7775c26de66c888a2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello All,&lt;/p&gt;
&lt;p&gt;I have a device that cyclically sends CAN frames to the network. I want to receive this data using Codesys and a PLC controller and at this point there is a problem. As I do not have physical access (yet) to the device, I send data in the CAN network using the USB-CAN adapter. This is example frame 0x01,0x04, 0x01,0x02,0x03,0x04 (CAN ID, length of data and data). I want to read this data in Codesys. I currently have the following error: CANOPEN_WRONG_PARAMETER. In the case of the Beckhoff controller, things were simple because the CANopen Master module read the data itself. How read CAN frame that I generate using USB-CAN adapter in Codesys?&lt;/p&gt;
&lt;p&gt;&lt;img src="./attachment/attachment.png" width="50%"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>