Posted 20 Apr 2015 hi guys i made a program with C++. i use camera for finding centre of object. it works well. It finds centres like 70 milimeters. now i want to send it to plc and not just once. this centre should go to plc always or when the camera see the object. i have no idea about that. i use visual studio and my plc is LS. please help me this photo is my program result. Share this post Link to post Share on other sites
Posted 20 Apr 2015 (edited) Hello, That depends on what you want to send to the PLC. A Boolean that indicates the object is +- millimeters from center, the value of the millimeters from center, a part is detected, etc.. Edited 20 Apr 2015 by Mark- Share this post Link to post Share on other sites
Posted 21 Apr 2015 I will send the object centre's coordinates. for example X=70, Y=150. i want to send that x to plc.. so i can take this object with a robot arm. my plc needs to know where this object now. regards thank you Share this post Link to post Share on other sites
Posted 21 Apr 2015 Hello, OK, so the next question is do you want to use a communication protocol to the PLC or analog inputs on the PLC? For example, your program could be a MODBUS master and send the data to the PLC that is a MODBUS slave. Or you could use two analog inputs on the PLC; use a device attached to your PC and output the X/Y as analog outputs. Share this post Link to post Share on other sites
Posted 21 Apr 2015 hello, Actually i dont have any idea about those options but a friend said me that search modbus but i dont know how i can use it. regards thank you Share this post Link to post Share on other sites
Posted 21 Apr 2015 Hello, MODBUS is a communications protocol, actually there are several flavors. Search the web and you will find thousands of links. It is easy to implement and you will find source code. Share this post Link to post Share on other sites
Posted 21 Apr 2015 thanks for helping I will search it..if u send me an example about it .. it will be great :D regards Share this post Link to post Share on other sites
Posted 30 Apr 2015 Hi, It seems LS PLC ( diiferent types) has only Serial ports (RS-232 or RS-485). For this reason, you need to consider the serial communication. If you are going to Modbus, then Modbus RTU can be used with your PLC. However you may need a USB converter to connect it to your PC/Laptop. for this reason you may use RS-485 to USB converter like I-7561 http://www.icpdas-usa.com/i_7561u.html?r=mohsen If you are going to use Modbus TCP which is Modbus over Ethernet, you probaly will need MTCP to Serial converter as well. If so, you can use I-7188E3 http://www.icpdas-usa.com/i_7188e3_232.html?r=mohsen Good Luck Share this post Link to post Share on other sites
Posted 6 May 2015 thanks someone has an example ..i really need it Share this post Link to post Share on other sites