Hello, Does anyone know of a way to get the IQ brain to communicate with a PLC?
Hi @IB007, welcome to the VEX Forum!
The IQ brain talks to the smart devices (motors, sensors) over I2C, there is some example (ROBOTC) code to talk to a generic I2C device here:
Also in that repo is a PDF with some more info:
(“PLC” didn’t immediately register a meaning with me – a google search suggests “Programmable Logic Controller”, which Wikipedia describes as “an industrial computer that has been ruggedized and adapted for the control of manufacturing processes, such as assembly lines, machines, robotic devices, or any activity that requires high reliability, ease of programming, and process fault diagnosis”)
Big fan of RLL? I guess my first impression if I were to try to interconnect the PLC with an IQ brain, would be to get a PLC with digital relay output, PLC as the main controller triggering actions on the brain through the ports via “bumper switches” which would be easy to set up between the PLC and the IQ brain without having to figure out any weird protocols. Not knowing your application, if you wanted to be portable and you went with one of the automationdirect.com plcs, like the click or the D005, you could get one that runs on 24 volts and run it on a pair of rechargeable 12 volt batteries. The only thing to figure out would be if the PLC outputs / IQ brain inputs need to be sinking or sourcing, or maybe it doesn’t matter.
Not exactly on topic but related.
IQ generation 2 has a little more flexibility in port use for hobby type applications. IQ gen 1 had four internal I2C buses for the 12 ports, so 3 ports per I2C bus. IQ gen 2 has twice as many I2C buses, that means ports 1, 6, 7 and 12 are on dedicated buses not shared with other ports (the otehr four buses have two ports each). In addition to this, those ports can be configured for asynchronous serial (logic level signals), simple digital IO (2 output, 1 input) as well as generic I2C that does not use the VEX enumeration or protocol.
I’ll post some example code when I get a chance.
I just graduated college in August (Mechanical & Industrial Engineering Technology) and landed my first job as a Controls Engineer. I’ve been working for about a month now and I’m learning GXworks 3 from the ground up. I use a FX5U Mitsubishi PLC at work to test out my code. I’ve had this VEX IQ kit for a while and I want to build a small assembly line or robot to test my code on. I saw that the IQ brain has an ethernet port so I’m wondering if I can get the IQ brain and its motors/sensors to Communicate with the PLC. But I’m very new to the PLC world so I have no idea how to go about it.
Thanks for the help!
The IQ brain has an RJ45 port but it’s not talking to anything over ethernet – just using the commonly-available port and cable to pair with the controller.
you definitely seem to know what your talking about. At work we use Mitsubishi FX5U PLC’s and GXworks 3. Do you have any suggestions on how to start this process??