Hello,
I’m making a new application for my industry.
The purpose is to control the robot by an external application.
The robot act like a server and the application is the client.
Now, I’m at the begining, but the communication is not working.
In the ursim, I have this code in the BeforeStart program :
def beforeProgram():
ipAddress = “192.168.56.1”
portNumber = 136
signalName = “Communication”
modbus_add_signal(ipAddress, 255, portNumber, 0, signalName)
end
And in my application (in C#), I have that :
client = new ModbusClient(192.168.56.1, 136);
client.Connect();
I have try multiplical tries, but that does’nt work…
I have check already check that my virtual machin alow ursim to create a server
Anyone could help me ?
Ebbe
December 11, 2020, 1:56pm
2
Hi @thierry.beboux ,
Welcome to the UR community forum!
This topic might be helpful to you. And reading this article is also worth reading.
Best regards
Ebbe
HI @Ebbe ,
Thanks for your answer.
Now, my server is created. But I can’t reach the good address.
In first time, I try to read the input in address 0 (like documentation says) or the analog output (address 16).
Code: modbus_add_signal(“192.168.56.101”, 255, 0, 0, “Communication”)
In ursim, I try to toggle the input in simulation mode, but I can’t see any change in my application. I think that I don’t have the good address, but I don’t know where to look…
Have you more informations to help me again ?
Best regards
Ebbe
December 14, 2020, 1:39pm
4
Hi @thierry.beboux ,
I am not quite sure where you are having your issues and where your C# application is running?
As I stated here, it is a nice exercise from URScript to connect to local host on “127.0.0.1”:
Hi @mehmet_bilgin_1905 ,
The addresses you have marked in Polyscope, is what Polyscope uses for the signal_address in URScript. It is the register on you PLC that you need to specify here. A nice approach is to connect to local host on IP address “127.0.0.1” and add a Register Output signal with address 1. Then you will see that it maps to the outputs of the robot and you can modify them by writing a bit pattern in the value field.
Ebbe
Ebbe
Thanks for your answers.
I have found my probleme and solved id
But I still have a question. I can read and write the registers output and read the input.
Is there a possibility to write/read a register that is note connected to a physically port ?
For example : I want to send to the robot a start command, but I can’t make it without a physically output.
Can I send an information purely virtual ?
Béboux
Ebbe
April 26, 2021, 12:46pm
6
Hi @thierry.beboux
Address 128-255 is general purpose register that you can use for that purpose.
Ebbe
1 Like
system
Closed
April 28, 2021, 12:46pm
7
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.