CANopen example lpc11c14

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CANopen example lpc11c14

3,371 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Thu Dec 22 23:43:44 MST 2011
Hello! I try to get understand this sample. Data in OD are following:
CAN_ODCONSTENTRY myConstOD [] = {
/* index, subindex,length,value */
{ 0x1000, 0x00, 4, 0x54534554UL },  // "TEST"
{ 0x1018, 0x00, 1, 0x54534554UL },
{ 0x1018, 0x01, 4, 0xFFFFFFFFUL },
{ 0x2000, 0x00, 1, (uint32_t)'M' },
};

So I tried to read 0x1000 index and 0x00 subindex, request from master was following:
ID = 0x614; data0 = 0b0100 0000; data1 = 0x10; data2 = 0x00; data3 = 0x00; data4...data7 = 0;
The slave (board) always answers as follows:
ID = 0x594; data0 = 0x80; data1 = 0x10; data2 = 0x00; data3 = 0x00; data4 = 0; data5 = 0; data6 = 0x02; data7 = 0x06;

Why data don't equal 0x54534554UL? thank you.
0 Kudos
Reply
16 Replies

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Mon Oct 28 09:18:00 MST 2013
Can you please explain me how to use PCAN-View  software for heartbeat protocol
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Mon Oct 28 09:17:32 MST 2013
Can you please explain me how to use PCAN-View  software for heartbeat protocol
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Mon Oct 28 06:45:00 MST 2013
Can you please tell me how to send an heartbeat message in PCAN-View software?
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Oct 28 06:33:22 MST 2013

Quote: mahalinr
Can you please tell me how to send an heartbeat message in PCAN-View software?



Sorry, I don't use PCAN. Perhaps an user manual can help?

http://www.peak-system.com/Support.55.0.html
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Mon Oct 28 05:40:47 MST 2013
Hallo

    Thanks for the document.I have studied that.

   Can you please tell me how to send an heartbeat message in PCAN-View software?
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Mon Oct 28 01:22:04 MST 2013
Thank you very much
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Oct 28 01:04:53 MST 2013

Quote: mahalinr
I need to know the Data which is to be entered in PCAN-View Software.

I am new to this software and I do no how to find COB-ID and DATA for CAN-OPEN



That's CANopen. CANopen Basics:

http://www.canopensolutions.com/english/about_canopen/device_configuration_canopen.shtml

http://www.ars-informatica.com/Root/Code/CANOPEN/SDO.aspx

Would suggest to spend a few hours (or days) to learn this. Without this fundamentals it's difficult to use CANopen...
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Mon Oct 28 00:40:55 MST 2013
Thanks for your reply.

I need to know the Data which is to be entered in PCAN-View Software.

I am new to this software and I do no how to find COB-ID and DATA for CAN-OPEN

Plz help me out

Thx in advamce
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Oct 25 03:56:45 MST 2013

Quote: mahalinr
Can you please tell me how to find the data (8 bytes) and ID



Which data ? CANOpen SDO ?

Google is your friend, even in Germany:

http://www.frenzel-berg.de/fileadmin/FrenzelBerg/Datenblaetter/ds_canopenguide_v001r001_de.pdf

0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahalinr on Fri Oct 25 03:31:24 MST 2013
Can you please tell me how to find the data (8 bytes) and ID

For data,is it like we can write any random values


thx in advance
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Tue Feb 21 04:30:11 MST 2012

Quote: Rajesh
Hi  yanvasilij,
                       Am very new to canopen.I have handled can API functions successfully..But am struggling with SDO protocol implementation.Moreover i didn't get these sample codings which has been given by NXP.
                   I saw your post regarding SDO read from OD(Index,sub index).Now i just want to know working steps to implement SDO protocol in detail and i need comments for all API functions.If possible send source code for SDO write,read...If u dont mind can i personally contact you..I need to clarify more doubts in canopen..thats why..Am waiting for ur reply
  my mail id: [EMAIL=prakashnprajith@gmail.com]prakashnprajith@gmail.com[/EMAIL]



I've just seen your post. sorry:o. does it still need?
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rajesh on Thu Jan 19 22:38:52 MST 2012
Hi  yanvasilij,
                       Am very new to canopen.I have handled can API functions successfully..But am struggling with SDO protocol implementation.Moreover i didn't get these sample codings which has been given by NXP.
                   I saw your post regarding SDO read from OD(Index,sub index).Now i just want to know working steps to implement SDO protocol in detail and i need comments for all API functions.If possible send source code for SDO write,read...If u dont mind can i personally contact you..I need to clarify more doubts in canopen..thats why..Am waiting for ur reply
  my mail id: [EMAIL=prakashnprajith@gmail.com]prakashnprajith@gmail.com[/EMAIL]
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Sun Dec 25 04:05:40 MST 2011
All clear, thanks a lot!
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Dec 23 05:01:19 MST 2011

Quote:

Why?

Your sample is including this part to read 'param' from index 0x2001 :eek:

/* CANopen Callback for expedited read accesses */
uint32_t CANOPEN_sdo_exp_read(uint16_t index, uint8_t subindex)
{
 if (index == 0x2001)
 param++;
 return 0;  // Return 0 for successs, SDO Abort code for error
}
Asking for that data with:

ID: 0x614
DLC:0x08
D0: 0x44
D1: 0x01
D2: 0x20
D3: 0x00
D4: 0x00
D5: 0x00
D6: 0x00
D7: 0x00    

results in node responding  'param' in D4-7
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Fri Dec 23 04:31:41 MST 2011
Well, it seems it work ))), thanks! But I did as you seid, answer was following:
D: 0x594
DLC:0x08
D0: 0x4B
D1: 0x01
D2: 0x20
D3: 0x00
D4: 0x22
D5: 0x00
D6: 0x00
D7: 0x00
Why?
0 Kudos
Reply

3,123 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Dec 23 04:08:07 MST 2011

Quote:

Why data don't equal 0x54534554UL?

Because you don't ask for that data :eek:

Try:

ID: 0x614
DLC:0x08
D0: 0x44
D1: 0x00
D2: 0x10
D3: 0x00
D4: 0x00
D5: 0x00
D6: 0x00
D7: 0x00

And after that try:

ID: 0x614
DLC:0x08
D0: 0x44
D1: 0x01
D2: 0x20
D3: 0x00
D4: 0x00
D5: 0x00
D6: 0x00
D7: 0x00
0 Kudos
Reply