I'm new to this language, and I'm having trouble communicating with my ADAM modules. I'm trying to use the Serial COM example available at the CODESYS store.
My problem seems to be my inability perform Online->Login without being in Simulation Mode. When I attempt to login, I am asked to scan the network for a device, which yields the error message, "No device is responding to the scan request." I simply want my PC to act as the PLC for now, so I'm trying to make the Active Path of my device lead to my PC, to no avail.
I've also edited the Gateway Configuration from the Device Tab->Communications Settings->Gateway dropdown box->Connect to Local Gateway. I've included COM Port COM5, with the appropriate port number and baudrate, which didn't help either. When I scan the network, nothing appears under Gateway-1, no matter what the Gateway Configuration.
I'm able to send and receive data from my ADAM's via a USB -> RS-485 adapter using any software except CODESYS. It is only CODESYS' communication methods I'm having trouble with.
If anyone else has come across this problem and found a solution, please let me know or link the solution. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
is your plc running?
(check Tasktray Icon)
Usually it is not needed to edit the Gateway you could Login by TCPIP (sure same machine where CODESYS runs)
For communication with the ADAM modules which protocol do These devices support modbus rtu?
an othr option could be to use serial com (with own made protocoll)
I was able to log in by activating the PLC, but I had to update the Device from Win V3 64 to Win V3, even though I have a 64-bit Windows 7 OS.
I'm still not able to open the COM port, but at least I'm getting an error message now. I'm going to keep trying things and return to this thread when I have more information.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
even if you have 64Bit Windows, the 'default' installation of the soft plc 'Control Win' is the 32Bit version.
I do not see really a advanatage using a Control Win64 Bit.
Which error message do you get on comport open?
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried using the project SerialComWithVisu, and got the same result.
Though when I open another program that tries to talk to COM5 after either of these CODESYS projects ran, it will say the port is occupied. I take that as a good sign, since it seems like CODESYS is attempting to use the port at least.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's somewhat working now, so I figured I'd post an update.
I left the project for a few days, came back and ran it to find como1.xDone to be TRUE and the port successfully opening and closing. I was even able to send a command to my ADAM to open a valve. I have no explanation for what changed between then and now.
However, I'm not getting any reply strings from my module, such as when I ask it for firmware data, etc. I'll continue working at it and I'll post my solution if anyone's interested.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello CODESYS Board,
I'm new to this language, and I'm having trouble communicating with my ADAM modules. I'm trying to use the Serial COM example available at the CODESYS store.
My problem seems to be my inability perform Online->Login without being in Simulation Mode. When I attempt to login, I am asked to scan the network for a device, which yields the error message, "No device is responding to the scan request." I simply want my PC to act as the PLC for now, so I'm trying to make the Active Path of my device lead to my PC, to no avail.
I've also edited the Gateway Configuration from the Device Tab->Communications Settings->Gateway dropdown box->Connect to Local Gateway. I've included COM Port COM5, with the appropriate port number and baudrate, which didn't help either. When I scan the network, nothing appears under Gateway-1, no matter what the Gateway Configuration.
I'm able to send and receive data from my ADAM's via a USB -> RS-485 adapter using any software except CODESYS. It is only CODESYS' communication methods I'm having trouble with.
If anyone else has come across this problem and found a solution, please let me know or link the solution. Thanks!
Hi,
is your plc running?
(check Tasktray Icon)
Usually it is not needed to edit the Gateway you could Login by TCPIP (sure same machine where CODESYS runs)
For communication with the ADAM modules which protocol do These devices support modbus rtu?
an othr option could be to use serial com (with own made protocoll)
BR
Edwin
SysComTest.project [45.73 KiB]
Thanks Edwin,
I was able to log in by activating the PLC, but I had to update the Device from Win V3 64 to Win V3, even though I have a 64-bit Windows 7 OS.
I'm still not able to open the COM port, but at least I'm getting an error message now. I'm going to keep trying things and return to this thread when I have more information.
Hi,
even if you have 64Bit Windows, the 'default' installation of the soft plc 'Control Win' is the 32Bit version.
I do not see really a advanatage using a Control Win64 Bit.
Which error message do you get on comport open?
BR
Edwin
I am getting "ERROR_UNKNOWN"... not too helpful.
I tried using the project SerialComWithVisu, and got the same result.
Though when I open another program that tries to talk to COM5 after either of these CODESYS projects ran, it will say the port is occupied. I take that as a good sign, since it seems like CODESYS is attempting to use the port at least.
It's somewhat working now, so I figured I'd post an update.
I left the project for a few days, came back and ran it to find como1.xDone to be TRUE and the port successfully opening and closing. I was even able to send a command to my ADAM to open a valve. I have no explanation for what changed between then and now.
However, I'm not getting any reply strings from my module, such as when I ask it for firmware data, etc. I'll continue working at it and I'll post my solution if anyone's interested.