problemas con conexion python a tia portal #491
-
|
I'm having issues with the following code in the part where it says datos = simular_datos_balanza. I added int() to convert the value to a numeric one, but it raises an error when reaching that line (int() argument must be a string, a bytes-like object, or a real number, not 'function'). I'm posting my code here below to see if someone can help me. I'm trying to simulate sending a weight to the general server when passing my hand over a sensor. Thank you in advance. import socket def simular_datos_balanza(): def recibir_pulso_sensor(plc): def iniciar_cliente(host, puerto): # Configuración del servidor, puerto y intervalos de tiemposervidor_host = '192.168.0.2' # Cambia esto a la dirección del servidor # Llamar a la función para iniciar el clienteiniciar_cliente(servidor_host, servidor_puerto) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
@ignaciofigue I don't understand the half of your post because of mixing English and Spainish with your code snippets. Can you reformat the post ? |
Beta Was this translation helpful? Give feedback.
-
this DOESN'T return an int ...
Your Issue isn't related to your library it will be closed |
Beta Was this translation helpful? Give feedback.
-
|
Closing as resolved. This was a basic Python coding error (missing parentheses in function call), not a python-snap7 issue. |
Beta Was this translation helpful? Give feedback.
Closing as resolved. This was a basic Python coding error (missing parentheses in function call), not a python-snap7 issue.