Vayu Posted August 3, 2005 Report Share Posted August 3, 2005 Hello, not much to say i am trying and trying to send messages over the NI CAN Card, but it doesnt work. the receiving part is a CAN Interface (Peak CAN -> USBtoCAN) i tried to send data over the MAX test panel. Actually there is going data over the cable (tested with an oscilloscope) but the counterpart seems not to know what to do with it. PeakCANView does not show any kind of received data. Does someone of you have some experience with CAN Cards? Would be great , if you could post a VI which sends messages. i found a NI tutorial for CAN VIs, but there is only shown how to read from the port, not how to send. My problem is, that i dont know where to put in the data i set up a message/channel, but thats all. i attach my VI under this post, if you might want to have a look at it. Thanks in advance Vayu Download File:post-2614-1123072947.vi Quote Link to comment
dhuff Posted August 3, 2005 Report Share Posted August 3, 2005 OK, a few quick things, The CAN interface for the CAN Init Start.vi (the middle VI) shows that the channel might not be setup correctly in your interface. You usually tell the task to send on channels like CAN0 or CAN1. Those channels are defined in NI MAX (Measurement & Automation Explorer) So you need to start NI Max, and define the CAN channels. This tells Labview which physical CAN port is CAN0, and details associated with it. Second Thing: CAN communications require at least 1 listener and 1 CAN sender, otherwise the CAN interface will report a CAN bus error. So you need to start the receiver before you send. You also need to make sure you are sending and receiving the messages with the same baud rate, and the same length of CAN ID (11 bit standard ID or 29 bit Extended ID) Third Thing: You should really connect and use the error input /output clusters, they will usually help tell you if the CAN interface has a problem. Your VI does not have the error clusters hooked up to help you. (If you run it in Execution Highlight Mode they will show which VI has an error) There should be some examples installed when you installed NI-CAN which might help. Since you are using Labview 7.1, start labview, click Help, Then Click on Find Examples. Under The Hardware Input And Output Folder, You will find a CAN folder. Most of those examples are also on the NI website, Look for them under industrial networks NI Developer Zone > Development Library > Industrial Networks > CAN Hope this helps Quote Link to comment
Vayu Posted August 4, 2005 Author Report Share Posted August 4, 2005 Hello dhuff, Thank you for taking your time @First thing: The channel was setup correctly, following the instructions in the LabView Help (opened MAX, then created a message and a channel for it. Assigned all 64 Bits to the channel) @Second Thing: I had a listener (PeakCAN Viewer). Damn thing is, it seems he is only listening, but NOT acknowledging the messages, what also leads to an error frame. @Third Thing: I'll do in the future, I promise @Fourth Thing: GREAT, i think i searched the false menus for those examples. I think they should help me getting some connection started Thanks Vayu Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.