<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to use the function block of CANOpenDevice?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3a3b34d02f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3a3b34d02f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/3a3b34d02f/</id><updated>2020-02-27T13:54:21.012000Z</updated><subtitle>Recent posts to How to use the function block of CANOpenDevice?</subtitle><entry><title>How to use the function block of CANOpenDevice?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3a3b34d02f/?limit=25#ce7d" rel="alternate"/><published>2020-02-27T13:54:21.012000Z</published><updated>2020-02-27T13:54:21.012000Z</updated><author><name>ScottJones</name><uri>https://forge.codesys.com/u/scottjones/</uri></author><id>https://forge.codesys.com222041491f663353f24dfe3dce0c66382a434d88</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am working on a an CodeSys program for a Wachendorff A1 and need to use CAN, but not neccessarily using a Protocol like CANOpen.  I just want to set the Message ID,  RTR, Extended/Standard, etc and transmit the message either cyclically or when requested.   I have used CAN extensively in another proprietary program (Sauer-Danfoss Plus1)that uses FBD to program and know CANOpen, Devicenet and J1939 protocols pretty well, but this my first time in CodeSys (Visulation).  Usually when I am doing the sending and receiving for all of the devices.  I just stuff the data into each message and use as many messages that are needed, don't write or use an actual protocol. &lt;/p&gt;
&lt;p&gt;If Anyone has any examples on setting up just generic CAN messages it would be helpful.  If anyone has questions specific to CAN protocols, ask me especially CANOpen and J1939. Thanks&lt;/p&gt;
&lt;p&gt;Scott&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to use the function block of CANOpenDevice?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3a3b34d02f/?limit=25#8cd9" rel="alternate"/><published>2020-02-27T13:54:20.832000Z</published><updated>2020-02-27T13:54:20.832000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com97d1586811811e3b656646a4ab9d3b1dd35ce1bf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm not sure what you mean. Do you mean the CAN device you want to connect to is a "non CANopen device".&lt;br/&gt;
Should the CODESYS PLC act as a master?&lt;/p&gt;
&lt;p&gt;If is it not CANopen you could use the CAN low level library to connect to any CAN device.&lt;br/&gt;
For this you have to add the "CANbus" library, but this is not easy to use without a really good knowledge of the CAN protocol and CODESYS V3.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to use the function block of CANOpenDevice?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3a3b34d02f/?limit=25#ef41" rel="alternate"/><published>2020-02-27T13:54:20.651000Z</published><updated>2020-02-27T13:54:20.651000Z</updated><author><name>yue-qi-qi</name><uri>https://forge.codesys.com/u/yue-qi-qi/</uri></author><id>https://forge.codesys.com697d56137c2b57da16bd21b59fa4a8309e810b03</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK.&lt;br/&gt;
But is there some way to enable the slave self-startup?that is to enable the slave node to switch to the operation mode automaticly when the PLC is used in a nonCanopen network where there is no canopen master to issue the NMT command?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to use the function block of CANOpenDevice?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3a3b34d02f/?limit=25#e622" rel="alternate"/><published>2020-02-27T13:54:20.468000Z</published><updated>2020-02-27T13:54:20.468000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com2b069e7695d3922ddb784ae57d2ad7265094a15c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Don't define a CanOpenDevice in your application !!!&lt;br/&gt;
The CAN configurator and driver uses this library.&lt;br/&gt;
When you add the CANbus and add a CAN device in the device configuration, this FB is implicitly called.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to use the function block of CANOpenDevice?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3a3b34d02f/?limit=25#95fb" rel="alternate"/><published>2020-02-27T13:54:20.283000Z</published><updated>2020-02-27T13:54:20.283000Z</updated><author><name>yue-qi-qi</name><uri>https://forge.codesys.com/u/yue-qi-qi/</uri></author><id>https://forge.codesys.com20bf240c573e00b415ec477177082c983cac4b87</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In the 3S CANopenDevice library,there is a function block of CANOpenDevice.&lt;br/&gt;
When I define a instance of this function block like bellow:&lt;br/&gt;
PLC_PRG&lt;br/&gt;
   fbCanOpenDevice:CANOpenDevice;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;and do nothing to fbCanOpenDevice.&lt;br/&gt;
then rebuild the project,no problem.&lt;br/&gt;
but when download the project to the target, the target die, and the communication between the target to CoDeSys IDE will break.&lt;br/&gt;
Our target is Wachendorrf A3.&lt;/p&gt;
&lt;p&gt;But if I define the instance as global variables:&lt;br/&gt;
VAR_Global&lt;br/&gt;
 fbCanOpenDevice:CANOpenDevice;&lt;br/&gt;
END_VAR&lt;br/&gt;
and do nothing to fbCanOpenDevice.&lt;br/&gt;
The problem disappear.&lt;br/&gt;
But if add a call to the instance's method of fbCanOpenDevice.SwitchToOp() in the project. again the problem rise.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>