[quote author=Coding Badly link=topic=75200.msg570430#msg570430 date=1318756134]
Regardless of the triviality, you have to have some stated goal or no one will be able to help you. ...
That is a bit better. Data arrives in LabVIEW through the referenced hardware and the goal has been reached.
Your responsibility is: properly connect and configure the existing hardware; develop a LabVIEW application that interacts with the existing hardware; select more hardware to act as a second test node; develop an application to run on the test node; properly connect the NI 9853 to the test node; ensure data generated by the test node arrives in the LabVIEW application.
Is that a reasonable summary?[/quote]
Okay, now I see what you mean. Only the first two parts are explicit requirements: properly connect and configure the existing hardware; develop a LabVIEW application that interacts with the existing hardware. Doing both of those would be sufficient. The first has partially been done: Identical projects have been done for digital and analog I/O modules by previous students - I just have to repeat it with the NI 9853.
The previous students just wrote a LabVIEW application to read analog input (provided by a 9v battery) and a LabVIEW application to output a voltage via the analog and digital output modules, which they measured with a multimeter.
As for the rest:
select more hardware to act as a second test node; develop an application to run on the test node; properly connect the NI 9853 to the test node; ensure data generated by the test node arrives in the LabVIEW application.
I saw these as necessary steps to satisfy the first two responsibilities.
Another option I have been considering, after you said that I could create my own cables, is to run a loopback test:
http://digital.ni.com/public.nsf/allkb/CC3611C5424B715A862575D700723EB9
I hesitate because the second CAN port on the NI 9853 would have to receive 8-25V from the CAN bus to which it is connected, and I'm not sure how to do that. Other than that, this seems like it would be the best option that doesn't involve buying an expensive CAN-USB or CAN-RS232 adapter.
While an Arduino + CANBUS shield will assuredly work, it's difficult to say if that's a good choice. You have not provided enough information to reach an opinion.
...
Ultimately, how will the cRIO equipment be used? Prioritized data collection? Engine control?
There are currently no plans to use the cRIO equipment for anything. It will likely remain unused until some student gets interested in using it for a class project. The way the lab works is that there is hardware available for use by students, and we take several classes in which we're allowed to pick a piece of hardware and get it into a state such that a student in a later semester may use it to do something. The other option is to pick some equipment that is being used in an existing project, and expand that project.
Since I cannot predict what a future student will want to do with a cRIO system and a second node, I think that the most important considerations are flexibility and ease of use.
That's because the most common complaints I hear from other students are:
-the documentation for their existing project is poorly-written
-the documentation for their equipment is outdated, incomplete, incomprehensible, or impossible to find
-the project they have selected (or been assigned) leaves little room for choice in how to expand it, so they end up working on a project they're not interested in
I see the Arduino + CANBUS shield option as being flexible because a future student can then make this node do pretty much whatever he or she wants. Arduino is well known and widely-used, so that a future student will be less likely to be stuck without documentation to follow or any people to ask for guidance. Whether the next student wants to do data collection, engine control, or add a third node for some reason, adding an Arduino board as a second node won't get in their way, will it?
I would love to try to get them to communicate in a time-triggered manner
...
Huh?
A time-triggered system is a real-time system that sees it nodes communicate according to a fixed schedule so that no two nodes ever attempt to broadcast messages on the bus at the same time, and thus no messages are received "late" due to being preempted by a message of higher priority. Another benefit is that the operation of the system is deterministic, which can make it easier to test. This can be implemented in software for communication over CAN, but it's complicated and would require much more time, effort, and learning on my part. Still, it would make a cool semester project.
In fact, I'll have first dibs on this equipment next semester if I'd like to do something like that. I would also be able to work on it during the entire semester instead of just the last half.
This (about $400)......and two weeks should get you to that goal.
I'm sorry, I really don't want to spend much more than $100-200 on this project. Though I can be reimbursed for anything I get approved by my professor, I doubt he'll approve this since there are cheaper alternatives and it doesn't seem like open the door for expansion by another student.
Not only can you make your own cables but for short distances or low bit rates, the quality of the cable is almost irrelevant. I've had two nodes communicating reliably with: a single terminating resistor instead of one on each end; no ground (just CAN_H and CAN_L connected); wire I found in a box of scrap; wire wrapped around a 110-to-24 volt transformer.
Basically, you put a 120 ohm resistor across CAN_H and CAN_L at each end, connect CAN_H to CAN_H, connect CAN_L to CAN_L, and connect CAN_GND to CAN_GND.
That sounds much more simple than I was hoping.
So, to satisfy my immediate responsibility, I want to run the loopback test. How much more difficult would it be to carry a voltage to the second port of the NI 9853?
As for my personal goal: Do you agree that the Ardunio seems like a good solution in light of vague and unpredictable future requirements?