<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CANOpen Layer Setting Services (LSS)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/</id><updated>2023-07-14T05:57:51.503000Z</updated><subtitle>Recent posts to CANOpen Layer Setting Services (LSS)</subtitle><entry><title>CANOpen Layer Setting Services (LSS)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/?limit=25#8331" rel="alternate"/><published>2023-07-14T05:57:51.503000Z</published><updated>2023-07-14T05:57:51.503000Z</updated><author><name>Ben Lewis</name><uri>https://forge.codesys.com/u/egret/</uri></author><id>https://forge.codesys.com7f14871ba9218092573cad8124d6dd87784bcbe6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Oops! I was looking at the wrong example project. It makes sense now. Thanks for your help.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CANOpen Layer Setting Services (LSS)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/?limit=25#432d" rel="alternate"/><published>2023-07-13T07:50:51.661000Z</published><updated>2023-07-13T07:50:51.661000Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.comf47897aaf5ad9ae127a7db0f0dbd48e8ecb1292f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The example project, which is included in the package, shows an example with CFC program (CFC_PRG). This calls the FB MsgProcessor_EchoCFC. This FB calls a method ProcessMessage, which calls the FB CAN.CANSender. This has a reference to the interface of the CANDriver and a reference to the Message you want to send.&lt;/p&gt;
&lt;p&gt;So you could use this FB to send any CAN message.&lt;/p&gt;
&lt;p&gt;The Message is a struct:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;TYPE MESSAGE :&lt;/span&gt;
&lt;span class="err"&gt;STRUCT&lt;/span&gt;
&lt;span class="err"&gt;    udiCanID        : UDINT; (* CAN-ID (Communication Object Identifier) is the bitId of a CAN-frame *)&lt;/span&gt;
&lt;span class="err"&gt;    abyData         : ARRAY[0..7] OF BYTE; (* Array for 0 to 7 bytes of data *)&lt;/span&gt;
&lt;span class="err"&gt;    usiDataLength   : USINT; (* The length of the data array 0 to 8 *)&lt;/span&gt;
&lt;span class="err"&gt;    xRTR            : BOOL; (* Remote Transmission Request *)&lt;/span&gt;
&lt;span class="err"&gt;    xIs29BitMessage : BOOL; (* TRUE: the messages is a 29bit message, FALSE: the message is a 11bit message *)&lt;/span&gt;
&lt;span class="err"&gt;END_STRUCT&lt;/span&gt;
&lt;span class="err"&gt;END_TYPE&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;For LSS, you can use as udiCanID - 16#7E5. You always should send 8 bytes for an LSS message.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CANOpen Layer Setting Services (LSS)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/?limit=25#481c" rel="alternate"/><published>2023-07-13T07:21:16.968000Z</published><updated>2023-07-13T07:21:16.968000Z</updated><author><name>Ben Lewis</name><uri>https://forge.codesys.com/u/egret/</uri></author><id>https://forge.codesys.com4fdf87d9df75a9adad8497880e5585f421bf8fbb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I've had a look at the example code you pointed me to. Unfortunately, I can't see any examples of a write function that does not use SDO messages. Can you be more specific about which function block might work?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CANOpen Layer Setting Services (LSS)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/?limit=25#98f4" rel="alternate"/><published>2023-07-12T06:58:39.062000Z</published><updated>2023-07-12T06:58:39.062000Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.combd280fc71ec47f26ffb0bdf8a57f3ad3f17b979a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Ben, you are right, I answered too quickly. You need to send a message with own defined COB ID. Probably the CAN Level2 communication is your best option. There is an example project available which contains a library that encapsulates this communication method to access it in an OOP way.&lt;/p&gt;
&lt;p&gt;See the store:&lt;br/&gt;
&lt;a href="https://store.codesys.com/en/canbus-example.html" rel="nofollow"&gt;https://store.codesys.com/en/canbus-example.html&lt;/a&gt;&lt;br/&gt;
In the package is a library and an example project. Hopefully this helps.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CANOpen Layer Setting Services (LSS)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/?limit=25#76a2" rel="alternate"/><published>2023-07-11T08:36:19.901000Z</published><updated>2023-07-11T08:36:19.901000Z</updated><author><name>Ben Lewis</name><uri>https://forge.codesys.com/u/egret/</uri></author><id>https://forge.codesys.com2617cf7430887a13ff18f5ffea64c86d8aed3dd2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you for your reply and sorry for my delayed response. I was not able to test your suggestion until now.&lt;/p&gt;
&lt;p&gt;I've created a program using the SDO_WRITE4 function block and I can now write SDOs. For example, I can change the baud rate of a CANOpen device.&lt;/p&gt;
&lt;p&gt;However, I don't understand how to use SDO_WRITE4 to write LSS messages. This function block takes in the destination node-id on the DEVICE input. However, LSS messages use special reserved COB-IDs without node-ids. Is there a way to get around this?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CANOpen Layer Setting Services (LSS)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/?limit=25#cc2a" rel="alternate"/><published>2023-06-09T08:10:26.564000Z</published><updated>2023-06-09T08:10:26.564000Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com552f3a29f6d860fc58d9b1f5432528b705cc3695</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When you create your I/O configuration with CANopen Manager, automatically the CAA CiA405 library is added. This includes an FB SDO_WRITE4. You can use this to send the LSS messages.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CANOpen Layer Setting Services (LSS)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a59c546300/?limit=25#6695" rel="alternate"/><published>2023-06-08T07:22:04.119000Z</published><updated>2023-06-08T07:22:04.119000Z</updated><author><name>egret</name><uri>https://forge.codesys.com/u/egret/</uri></author><id>https://forge.codesys.com2aa7bab2aa6d494e78f00d63886a5e1a18aadabb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have an Axiomatic AX021101 CANOpen valve controller that I'd like to configure.&lt;/p&gt;
&lt;p&gt;Here's a link to the user manual.&lt;br/&gt;
&lt;a href="https://products.axiomatic.com/Asset/UMAX021101.pdf" rel="nofollow"&gt;https://products.axiomatic.com/Asset/UMAX021101.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Section 3.0.1 states:&lt;br/&gt;
"The only means by which the Node-ID and Baudrate can be changed is to use Layer Setting Services (LSS) and protocols as defined by CANopen standard DS-305."&lt;/p&gt;
&lt;p&gt;I've seen a number of posts online that indicate that this can be done by writing a small Codesys program.&lt;br/&gt;
Here are two examples:&lt;br/&gt;
&lt;a href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/1490774df6/"&gt;https://forge.codesys.com/forge/talk/CODESYS-V2/thread/1490774df6/&lt;/a&gt;&lt;br/&gt;
&lt;a href="https://stackoverflow.com/questions/56738715/codesys-and-canopen-multisame-nodeid" rel="nofollow"&gt;https://stackoverflow.com/questions/56738715/codesys-and-canopen-multisame-nodeid&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can anyone point me to which libraries and functions are required to send and receive LSS messages?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>