hi all, in my new project im searching for a way to communicate to a PLC through an arduino.
This plc has only a standard usb port and no other communication ports available. From the manual i read that this usb port does not support Modbus (!win) but only its native communication protocol.
i found on the manual the messages to be sent to set/reset coils, get status etc but im wondering how is going to be the physical connection to the plc. the plc is programmed through a standard usb type b cable and not rs232.
how im gonna connect an arduino to that usb port and send/receive commands?
do i need a usb>rs232 cable > rs232 to ttl board and connect them all to an arduino?
is there a way talk to the plc directly over a usb cable by only using the rx/tx lines? :o
Thanks in advance!
to recap,
you have instructions on how to do a thing that use a different language.
but, you do not want to tell anyone what device....
or what language......
and you think we can offer help ?
since you said physical connection, I am going to go out on a limb here..
I think you should use wires.
aha its a Fatek PLC FBs60 using facon communication protocol over a standard usb type b port.
ive got instructions on how to send and receive data (message format, ascii codes to send to receive certain data) but not how to connect another device to it (here an arduino).
like all PLC's suppliers, FACON offers a lot of various options for connections. there offer multiple serial port adapters that tie into the main communication buss. with RS232
from the literature : With interface options in RS232, RS485, USB, Ethernet, CANopen, Zigbee and GSM, the communication peripherals are available with 15 boards and modules.
All PLC's are set to address 1 and you can only change with a programming tool.
it looks like you might need to visit that USB port and verify what board it is connect to.
the USB is power and signal. so, you need to find out how that communicates in order to send your packet.
USB is a simple 2 wire with power and ground. if you have the protocols for the data packets, you should be able to use a USB interface to the Arduino to talk to the PLC.
but, it looks like the PLC has a lot of options for RS232 ports, ethernet ports, and that USB is only one option.
it might be easier to get a different port and then use that.
since all the PLC's have the main bus, can you poll that for data ?
i know its easier to buy a comm port/module but thats a university project so the plc is "as is" and no option to buy new hardware.
thats why i was wondering if i could talk to the plc through the built in usb port.
understood
the FBs use USB spec 1.1
and from what I have read, every PLC ships as address 1
sounds like you have to connect to the USB with your interface cable, then talk with your packets to send and receive data.
for the hardware side, the Arduino should be capable..
Also, from what I have read, you could make a simple display, add some menu buttons and then display your data. this seems like something of value to any PLC user.
http://www.beyondlogic.org/usbnutshell/usb1.shtml
so just using rx/tx lines from the usb cable connected to the plc will do the job?
ive seen usb host shield to communicate with usb devices. is that needed?
correct me if im wrong but ill also need an external 5V power supply to provide the current needed
thanks