LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET problems operating a Tritium WaveSculptor via cRIO

I'm wondering if anyone has experience operating a Tritium WaveSculptor motor controller (http://tritium.com.au/products/wavesculptor200-motor-inverter/) via XNET/CAN, because I'm having trouble. I know it's tough to debug someone else's code but maybe someone with XNET experience can give me some suggestions. I've attached the test project I'm playing with.

I'm running a NI 9862 CAN module in a NI 9082 cRIO trying to control a Tritium. I am able to receive packets just fine, and we've done some tests to confirm the data I'm getting (temperature, voltage, current) is valid so I know I'm looking at the right base address. However I can't get any response to any packets I send.

We've tested the connections between the CAN module and the Tritium with a multimeter and they are fine. We've operated the Tritium with the included Windows software via a CAN-Ethernet bridge and are able to get the motor to move so the Tritium responds to packets correctly. The Tritium is turned on (*cough* yes I made that mistake once), the cable is connected, it's connected to the right port, I'm writing to the correct base address of 0x500 (per the Tritium software).

I've tried sending motor control packets, information request packets, reset packet and configuration request packets. There is no response to any of them. The status broadcast packet doesn't show any errors or flags before, during or after transmission.

I've tried different ways of opening the sessions: predefining them in the project and opening them dynamically in the code. I've tried setting up frames as event data and cyclic data. I've tried it with and without software termination. We have only one CAN module and it's got a single port so we can't do a loopback test.

I'm at the point where I don't know what step to take next. I'm out of ideas, the client is tearing her hair out, and I'm rapidly burning through hours I need to use on other aspects of the project.

0 Kudos
Message 1 of 6
(3,182 Views)

Hello Andy_Humphrey,

 

You have already gone through several troubleshooting steps. Can you try posting your project again as it seems like it was not uploaded to the forum.

 

Have you tried using some of the LabVIEW shipping examples? If correctly configured they will run correctly with very little modifications.

 

How is your Tritium WaveSculptor connected to the cRIO?

 

Regards,

 

J_bou

0 Kudos
Message 2 of 6
(3,149 Views)

*ahem* Oh, yeah, upload the files... They should be attached this time. I should point out that, until this morning, I didn't understand signals vs. frames so I'm manually translating the data in the packets, which I now realize is silly. Still that shouldn't affect the transmission.

 

The connection is a custom cable made by one of the techs that connects the CAN module (9-pin male D-Sub connector) to the Tritium (6-way 3mm pitch Molex MicroFit connector). I have no idea what those connectors are. I just pasted those terms from the manuals.

 

I looked over the CAN examples but most of them require two CAN ports for a loopback. We don't have that. That's the frustrating part -- I have no way to be sure the packets are actually going out. I see no reason they wouldn't be, but still... I looked over the tranmission examples and I don't see anything in there I'm not doing already.

 

Since that post I have tried setting the echo transmission bit so I could see the outgoing packets. They seem to be configured correctly. I want to try sending signals instead of frames. I doubt that's the problem but you never know.

0 Kudos
Message 3 of 6
(3,137 Views)

Hello Andy_Humphrey,


You should be able to send frames to your Tritium WaveSculptor as long as it knows how to interpret the message. I would recommend trying to build a VI that is as simple as possible and test whether you can talk to your CAN device (which seems to be what you are doing with the Tritium Signals.vi).


Have you ever been able to communicate over CAN to this Tritium WaveSculptor? You could try using the XNET bus monitor to view the data being transmitted on the bus. This might help understand what is going on.


Regards,


J_bou

0 Kudos
Message 4 of 6
(3,111 Views)

Yup, that's the point to Tritium Signals -- a simple VI that just communicates with the Tritium without doing anything flashy.

We can send signals from the Tritium control software itself, a standalone Windows program that works through an Ethernet-CAN bridge rather than through the cRIO.

As for communicating from LabVIEW, today I was able to move the motor. I have no idea why. Well in part I know why -- since I'm using frames instead of signals like a dummy, I converted the values incorrectly (big-endian instead of little-endian) and that was at least part of the problem.

However I still can't get any response to request frames or reset frames. I ran the XNET Bus Monitor and I can see the standard broadcast packets the Tritium sends. However when I transmit, none of my packets show up on the Bus Monitor. I haven't tried running it with the motor attached. I'm curious because since the motor responds then something is getting through, but what and how?

Yet another complication is I'm not physically in the lab and the motor being controlled by the Tritium is large and energetic. It's disconnected most of the time for safety, so I have to have another person there to physically connect the battery pack when I run my tests, and people have real jobs so don't always have time to be my helper monkey. This is why I really wish I could get those information requests working because I can fiddle with those without needing someone in the lab.

We are getting a little help from Tritium, but they are in Australia and that complicates things with a 17-hour time difference. Basically we get 1-2 email exchanges per day.

0 Kudos
Message 5 of 6
(3,100 Views)

My latest progress, in case anyone else in the same situation comes across this thread.

Tritium has a utility at http://tritium.com.au/wp-content/uploads/2015/03/CanLogger_1_09.exe that monitors the signals being sent from the CAN module through the CAN-Ethernet bridge connected between the cRIO and another computer. We ran into one problem: the NI 9862 requires external power (+9 to +30V). The module comes with a Belden cable that allows connection a power source, so we eventually got it going.

Using that utility I was able to determine that my Request packets weren't being received because I was transmitting them as Single Point. Once I changed that to Stream, the packets showed up, correctly showing the RTR bit set. My Command, Reset and Configuration packets were all detected and looked fine.

However I still don't actually get a response from the Tritum to Reset, Configuration or Request packets. I have an email into Tritium to find out why. As mentioned, we were able to move the motor once I realized I was setting the current to zero (well, 1e-43, but basically zero) rather than 100%.

I'll post an update if I can ever figure out the other packets.

0 Kudos
Message 6 of 6
(3,073 Views)