I was hoping this would be easy, but I have not run across guidance on this subject.
Basically, I am trying to use an Arduino Mega to "replace" or function as a National Instruments cRIO industrial controller. This is so we can keep old robots running when we only have one $2K cRIO but lots of $50 Arduinos.
After a bit of work, I've found that for most of our robot applications / controls the Arduino works great. My problem now is to mimic the wireless control we have using PC->modem ===airwaves=== robot modem->cRIO-> running robot.
I've looked into Zeebee radios and such, but ideally, I'd like to make this as much as a "plug and play" option as possible. The robot has the modem and I'd just like to connect it to the Arduino through the Arduino Ethernet Shield.
The interface to the robot is composed of PWM control of motors and TTL control of 5V and 12V relay's. I've worked out all the interfacing from the Arduino to the various functional elements on the robot. That's not a problem.
What I am trying to do, is to connect the Arduino, through the modem on the robot (basically they way the cRIO is connected), to the control software on what we call the drive station. The drive station is a laptop computer( to which the control joysticks and game controllers are attached) running a specialized Labview program.
Basically what I'm talking about is:
Joysticks -> laptop computer (Labview Program) -> modem (attached to laptop) --> air waves -->
modem on robot -> Arduino -> control of motors and relays.
If I'm missing the point of your comments please let me know. Maybe if you ask a specific question I can provide the info you need.
Would you be able to post details of the modem that you have already? it's likely that you can just use it. If you can get information on the data protocol used by the existing controllers and PC software, you could probably implement the same protocol in an Arduino. If the information isn't readily available, perhaps you could decipher it yourself by capturing the serial data coming out of the modem. Remember you're going to need to level shift if the serial connection is RS232.
Basically because I am incapable at my current state of "learning" to answer your question, I would suggest you look at the URL I posted above to Chief Delphi. Apparently, someone who better speaks your language (ie. knows what you're talking about) has tracked down info on the communication protocol between our standard drive station and the cRIO we're tying to replace. It might make sense to you.
What intrigued me were his comments that Arduino (perhaps because of the current libraries) can not deal with the protocol and it had to be simplified. There is a suggestion that the library might be modified to get around this. Certainly this is beyond me and might be where folks skilled in the Arduino arts can give us FIRST guys a breakthrough.
I'm not a LabView user but 5 mins of reading points me in the direction of LIFA (LabView Interface For Arduino). With this you could adapt your current LabView implementation to talk to your Arduino (by serial via USB). The FAQ section suggests using a xbee or bluesmirf connection to make it wireless.
Just so we're on the same page. I am aware of LIFA. Problem is, what I want to do is emulate my current FIRST setup...
So what I would IDEALLY want to do is swap out the VERY expensive and HIGH powered cRIO with a nifty, low cost, yet powerful enough Arduino. Since it can do most of what I want...albeit slowly.. , I would just like to put the Arduino "in" and go for it.
So, I'd like to read the standard drive station LV signals, translate what it can in the Arduino, and have it run the robot. As I've mentioned in previous posts, the Arduino can do almost everything I need on the robot for the 2010 competition task.
My problem is, and the discussion on the first forums indicate it is not as difficult as I had believed, I want to transmit the drive station commands to the Arduino.
That's the issue...commands from the PC based drive station to the robot modem to the Arduino Shield to the Arduino to the robot.
I've already responded to you on ChiefDelphi, but I believe everyone here isn't familiar with the FIRST "modem". It's actually just an 802.11n Networking Bridge. The driver station is connected to a Linksys Wireless N router which is then connected to the bridge onboard the robot. By doing this, it essentially links the driver station and cRIO on the robot as though they are on the same ethernet network.
In this case, you can build your own controls by simply placing the wireless router onboard the robot and connecting to it with a laptop or other WiFi enabled device (such as I'm doing here: http://ttjcrew.com/?p=156). If you want to use something more traditional that only has an Ethernet port, you would simply keep the setup of the router and the bridge just like it is. I believe the default setup of the FIRST router is to have every device's IP statically defined. When you connect the Arduino you will hard code in an IP for it and your controlling device will also need a similar configuration (i.e. if the Arduino IP is 10.2.2.10 you could make the laptop 10.2.2.15).
Thanks again. Your description should help clarify things.
Since I don't have our router at home, I'm going to try to use the Android phone -> networking bridge approach. Hopefully I can get the router next week when the school opens back up.
Do you have any idea on the protocol used for communication? Something like wireshark on your client PC would allow you to view the contents of all of the packets leaving your PC. You can then filter down by destination IP address and view what's being sent backwards and forwards between the PC and the Crio.
I downloaded a copy a couple of weeks ago and have not had time to play with it.
It seems like Eric's group has things well in hand. I just need to get our other modem.
Now, as I think I've mentioned, I did come across references indicating that the Arduino can not currently read the whole string from the Drive Station. If I can figure out that that is, I'll be back asking for help.