Discussion:
Module control
(too old to reply)
can can canopen
2008-01-17 09:40:08 UTC
Permalink
Hi ALL,
 
The question is about the module control command,
When I send "Start" command after creating the CAN -INTERFACE and when I create SDO,PDO(tx){result all zero's} , EMCY i can read the data coming out of it.
When I create SYNC how do i wil come to know that object is active ?
 
EMCY response i wil get when I increase system DC-Bus above trip level of my DUT.
 
When I send "STOP" command I am not getting data from SDO read obj this is perfectly fine, But i am getting data from PDO read (all zero's).
How to check the SYNC response,weather it is active when I send STOP command.
 
I am getting data in the pre-operational command for Tx-PDO, what may be the reason.
 
MY DUT FAIL or something else.
 
 
Rima H.
2008-01-18 19:40:09 UTC
Permalink
Hi,
You can try looking at example CANopen programs that are posted throughout the discussion forum, such as <a href="http://forums.ni.com/ni/board/message?board.id=30&amp;message.id=1390&amp;requireLogin=False" target="_blank">here</a>.&nbsp; I hope this helps!
Regards,
Rima
can can canopen
2008-01-21 11:10:06 UTC
Permalink
Hi,
Thanks for the link. I am thinking of implementing only with the help of CANopen functions.Using Ni-CAN Frame API we can implement CANopen but can we do it using CANopen functions itself.
Rima H.
2008-01-22 23:10:07 UTC
Permalink
Hi,
You can certainly implement the CANopen functions by themselves.&nbsp; You can find examples specific to CANopen in the following directory:


body { margin: 0 0 0 0; padding:0 0 0 0 }
td,div { font-family:Tahoma;font-size:8pt;vertical-align:top }
body { margin: 0 0 0 0; padding:0 0 0 0 }
.transcript { background-color:#d2d2d2; }
.messageBlock { margin-left:4px; margin-bottom:3px }
.message { margin-left:100px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre; }
.messageCont { margin-left:100px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre;}
.other { color:#39577a;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.myself { color:#da8103;font-style:normal;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont { font-size:8px;text-align:right; color:#39577a;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.myselfCont { font-size:8px;text-align:right; color:#da8103;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.system { margin-left:4px; word-wrap:break-word;color:#da8103;font-style:normal;font-weight:normal; white-space:-moz-pre-wrap; _white-space:pre; }
.showTimestamp { margin-right:3px; float:right; color:#999999;font-style:normal;font-weight:normal; }
.other1 { color:#ac2000;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont1 { font-size:8px;text-align:right; color:#ac2000;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other2 { color:#3c9fa8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont2 { font-size:8px;text-align:right; color:#3c9fa8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other3 { color:#e25614;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont3 { font-size:8px;text-align:right; color:#e25614;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other4 { color:#0b6ac8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont4 { font-size:8px;text-align:right; color:#0b6ac8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other5 { color:#b23290;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont5 { font-size:8px;text-align:right; color:#b23290;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other6 { color:#02e7c7;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont6 { font-size:8px;text-align:right; color:#02e7c7;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other7 { color:#5b3284;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont7 { font-size:8px;text-align:right; color:#5b3284;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.tsDisplay { display:block }

C:\Program Files\National Instruments\LabVIEW 8.5\examples\CANopen

You will know that the object is active if the Sync Start VI doesn't return an error, because if it doesn't return an error, then that means it has started.&nbsp; Can you give us some more specific details about the data you receive in the pre-operational command?
Thanks,
Rima
can can canopen
2008-01-23 09:40:07 UTC
Permalink
Hi Rima,
I have developed a simple code as said by you,I am attaching the image of that , let me know if the understanding is proper or not.
I am using LABVIEW 8.0 so can you give me the examples if possible.
According to my understanding, when i give "ENTER-PRE-OPERATIONAL " command the SDO Tx and Rx messages should be available in the bus.
PDO-tx which i send to device will come in the bus,but not the response since the command is pre-operational.
So what i recieve is
SDO tx and RX messages, PDO(tx from my side = PDO rx from device side) , sync, emcy.These messages i recieve in the Bus monitor present in MAX.


sync error case.png:
http://forums.ni.com/attachments/ni/30/3146/1/sync error case.png


sync no-error case.png:
http://forums.ni.com/attachments/ni/30/3146/2/sync no-error case.png
Rima H.
2008-01-24 19:40:07 UTC
Permalink
Hi,
Since you're using LabVIEW 8.0, the CANopen examples will be located in the following directory:
C:\Program Files\National Instruments\LabVIEW 8.0\examples\CANopen
You will see a canopen.llb file, which contains several CANopen examples.
According to the CANopen LabVIEW Library Help, when the device is in the pre-operational state, it will support all CANopen communication objects, except for PDO objects.&nbsp; The device can be configured through SDO communication in this state.&nbsp; The supported communication objects in this state include SDO, SYNC, Emergency, and the Network Management objects (Heartbeat or Node Guarding, Module Control services).
Let me know if you have any specific questions about this, or if you are seeing an error when running your program.
Regards,
Rima

Loading...