From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NI CAN LabWindows Transmit Periodic Example Project

I bought NI CAN part NI USB-8473s. Of course there were no instructions in the box when it arrived.

 

Anyway I am trying to run the CAN Transmit Periodic project.

 

The program successfully configures (ncConfig) the Interface. However it fails in configuring the ObjectID and fails to open the object(ncOpenObject).

 

I modified the original program to add some printfs, to demo this issue. That routine, plus screen caps of the printouts, are attached.

 

As one can see, the default ObjectID is CAN0::STD5. Well the Measument and Automation Explorer does, Under Devices and Interfaces->NI_CAN Devices->USB-8473s, show a CAN0. I see no STD5 though.

 

Also I note that on the 8437s module that only the USB light is on , (in yellow) . The CAN light in not on. Should they not be green?

 

Very likely I have something else to do to set up this package, though, lacking instructions, my psychic powers fail me. Could someone point me to/ or give me, some instructions.

 

Regards,

Nolan93010

 

 

 

 

 

 

0 Kudos
Message 1 of 5
(4,334 Views)

Nolan,

 

The problem you are seeing is most likely due to the fact that USB devices with NI-CAN do not support NI-CAN objects. You are limited to Network Interface support only.

 

The yellow light signifies that you are using a USB 2.0 port. If the light was green, it was be using USB 1.0. The CAN light only turns on when it is reading from or writing to the bus.

0 Kudos
Message 2 of 5
(4,278 Views)

What does this comment mean?

 

I am writing to the CAN bus now and yes tthe light it turns on green.

 

But in doing so I am creating a CAN object and using that object.  So I guess I can crate/use CAN objects.

 

The issue is the fact that the NI  example as written does not work, and I had to create something else that did.

0 Kudos
Message 3 of 5
(4,253 Views)

Did you ever get this to work?

 

I don't think you can use periodic TX on the USB-8473.

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 4 of 5
(2,757 Views)

John,

 

You are correct. USB CAN devices that use the NI-CAN driver do not support periodic transmits due to the fact that they cannot use CAN Objects. The attribute you set to enable periodic transmits is an attribute of a CAN Object. The closest you'll get to a periodic transmit is through software timing (something like calling ncWrite within a loop at a specific rate), but the timing will not be as accurate as a hardware-timed periodic transmit.

 

Daniel V

Applications Engineer

0 Kudos
Message 5 of 5
(2,747 Views)