06-26-2012 11:12 PM
It should be noted that Arduino does not provide a multi programming environment. You said you were using an Arduno Mega to control a multi function machine. Hence if you wanted to use LIFA with your existing Arduino program you would need to combine the LIFA firmware and your existing Arduino program into one big program. I don't know if it is possible. But it sure sounds like it would be a lot of work. Instead of using one Arduino a beter approach would be to use two Arduinos. One is your existing Arduino Mega and a second dedicated to the CAN interface.
Howard
06-27-2012 10:29 AM
Ok All,
It seems that through this discussion the dilema has been solved. LIFA functions included with LabView provide SPI tools to interface with a Can Bus shield based upon using the Microchip MCP2515 CAN controller with MCP2551 CAN transceiver. This is as Dan says to pull bits of LabView LIFA functionality out and use what is needed. I am not a seasoned programmer, but I will give this a shot and hopefully have an actuator powered up and being commanded soon.
This can be found on two products: one from Spark Fun and the other http://code.google.com/p/canduino/. The latter is a much cheaper board, I was wonderiing what ya all thought of this as it also includes the SPI bus interface. Also, I'm still a bit fuzzy on using two Arduinos...can a standalone Arduino control Two actuators?
Larry
06-27-2012 01:29 PM
Yes, one Arduino can control more than one actuator.
But from <http://en.wikipedia.org/wiki/CAN_bus#Higher_layer_implementations> "As the CAN standard does not include tasks of application layer protocols, such as flow control, device addressing, and transportation of data blocks larger than one message, and above all, application data, many implementations of higher layer protocols were created."
Hence to provide a more informative answer we need to know what higher level protocols are compatible with your actuators. One possible higher level protocol for industrial automation your actuators may use is CANopen.
Howard