CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun Dec 16, 2018 12:34 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Nov 23, 2018 4:26 am 
Offline

Joined: Thu May 03, 2018 10:17 am
Posts: 3
Dear ALL,

Here i have a problem of CANopen Device(slave) in codesys, hope you all can give me some suggestions,thanks.

One micro controller from MKT is used as a CANopen slave, and in codesys i configured CANbus and CANopen Device (CAN LOCAL DEVICE) , then i edited the Nodeid and I/O area in CANopen deive(see configuration.jpg).

Then i found that the Access Type of RPDO mapping Entry parameters (e.g 0x1601:16#01,see accesstype.jpg) is const, my question is : is it possible to change this access type from const to rw?

Another question is : can i directly use the function EncodePDOMappingEntry for the OD mapping instead of configure OD in CANopen device?

Code:
IF(xEnable = FALSE)THEN 
   
   xEnable := TRUE;
   
   (*enable rxpdo cob-id mapping and entry*)
   pdoCobidEn[0] := _3SCSS.EncodePDOCOBID(xEnabled := TRUE,xExtendedID := FALSE,xRTR := FALSE,dwCOBID := 16#203); (*cob-id of 0x1400*)
   pdoMapEn[0]   := _3SCSS.EncodePDOMappingEntry(wIndex := 16#21CC,bySubIndex := 16#02,byLength := 16#20);
END_IF   
   

Thanks.


You do not have the required permissions to view the files attached to this post.

_________________
Kind regards/ Mit freundlichen Grüßen,
Liu Yanhua


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited