12-21-2006 08:43 AM
12-22-2006 04:45 AM
Hi,
I'm a little confused on the master/slave terminology you're using, however, as CAN (also Canopen) is really a peer bus. Any device on the CAN bus can transmit and receive messages as described below (from the NI-CAN User Manual):
"When a CAN device transmits data onto the network, an identifier that is unique throughout the network precedes the data. The identifier defines not only the content of the data, but also the priority. A CAN identifier, along with its associated data, is often referred to as a CAN Object. When a device transmits a message onto the CAN network, all other devices on the network receive that message
. Each receiving device
performs an acceptance test on the identifier to determine if the message is relevant to it. If the received identifier is not relevant to the device (such
as RPM received by an air conditioning controller), the device ignores the message.
When more than one CAN device transmits a message simultaneously, the identifier is used as a priority to determine which device gains access to the network. The lower the numerical value of the identifier, the higher its priority."
As you can see, you can use our CAN interface "slave" to receive commands from any other device on the CAN bus "master". 
Also the Canopen Library is just the API for LabVIEW, both CAN and Canopen ends up in Bits which then will be send to the "Listeners"! They´re just on other Layers on the Programming. But both is really easy with LabVIEW
Hope this helps.
Alex Rudolph
NI Switzerland
			
    
	
		
		
		12-22-2006
	
		
		09:36 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		02-13-2025
	
		
		10:13 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
				
		
		
			Content Cleaner
		
		
		
		
		
		
		
		
	
			
		
Hello
Yes i understand the CAN  terminology.
But the problem is, that the LabView CANopen Library is designed to build masters applications.
Which makes sense when we use the library, it sends RxPDOs and receives TxPDOs, you can check Heartbeats of devices and send SDOs and define a timeout for the reply.
This is all fine, but we're working with Products of Selectron and have a running CAN Master (in Hardware) and want to build slave devices in LabView for simulation. Therefore we need the CANopen library the "other way around". We want to send TxPDOs to our Master and receive RxPDOs from the Master. We need to reply with ClientSDO Messages to ServerSDO Messages we get from the CAN Master.
Hope you understand the problem we have here.
Ranil Wijeyratne
12-22-2006 10:06 AM
12-23-2006 05:31 AM - edited 12-23-2006 05:31 AM
Message Edited by pasln on 12-23-2006 05:41 AM
01-08-2007 12:33 AM
01-08-2007 01:19 AM
01-08-2007 09:32 AM
Hi,
Attached you can find some basic CANopen VIs writing and reading SDO and PDO data. I created them a long time ago and they are written as a Master as well. But you should be able to modify them in order to work as a Slave. A Slave is waiting for a remote frame or a NMT command in order to get operational or send data. Thus you need a continuously running loop checking for incommi9ng requests. The examples should help you dealing with COB IDs and NMT commands.
For Arif:
All this stuff is based on the NI-CAN api, but perhaps you can find the same api functions with your adlink board.
DirkW