Wago 750-652 Registerkommunikation

Lars123

Level-1
Beiträge
188
Reaktionspunkte
1
Zuviel Werbung?
-> Hier kostenlos registrieren
Moin,

ich wollte eine 750-652 per Programm einstellen. Im Handbuch findet man ja das Thema Registerkommunikation, aber wie macht man das?

Ich habe bisher kein Beispiel gefunden. Wie schreibt man diese Control- und Statusbytes? Meine Karte hat die Anfangsadresse %IB0 %QB0 24 Bytes lang.



Hat jemand sowas schon mal gemacht?


Lars
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Ich hatte hier bei mir das Problem das sich die Karte wieder in Default stellt....deswegen wollte ich nach jedem Neustart die Karte richtig stellen...24Bytes...rs485...9600baut usw
 
Ich hatte hier bei mir das Problem das sich die Karte wieder in Default stellt....deswegen wollte ich nach jedem Neustart die Karte richtig stellen...24Bytes...rs485...9600baut usw

24 Bytes ist default, diese reichen normalerweise auch. (Habe bis jetzt noch KEINE 48 bit benötigt)
Ob sich diese per Initialisierung anpassen lassen weiß ich nicht.


RS485 und 9600 Baud --> default.

Die o.g. werden bei der Initialisierung gesetzt.
Z.b. kannst du beim Aufruf RS232 und 19200 baud setzen.
 
Hallo Lars123,

alternativ zu der Dir schon zur Verfügung gestellten Bibliothek "Serial_Interface_01.lib", können bei den Klemmen „750-65x/003-000“ die Übertragungsparameter mit dem Programm „WAGO-I/O-Check 3“ verändert und in die Klemme geschrieben werden.
 
I would like to get some information about the RS-232/485 serial port (750-652). I would like to connect the RS-232/485 serial interface (750-652) to my hardware.
On my hardware there is only a micro USB cable that can be used as an interface between the PLC and the hardware and it works with the RS232 serial port according to the manual, but there is no DB-9 port on my hardware .

When I interface with my PC like a regular micro to USB cable and send an ASCII command, it works perfectly.
I know the RS-232 interface protocol, the ASCII command and the micro USB port. However, I would like to receive information on how to connect the RS-232/485 serial port (750-652) to my hardware. My hardware has a micro USB cable.
 
Zuviel Werbung?
-> Hier kostenlos registrieren
I would like to get some information about the RS-232/485 serial port (750-652). I would like to connect the RS-232/485 serial interface (750-652) to my hardware.
On my hardware there is only a micro USB cable that can be used as an interface between the PLC and the hardware and it works with the RS232 serial port according to the manual, but there is no DB-9 port on my hardware .

When I interface with my PC like a regular micro to USB cable and send an ASCII command, it works perfectly.
I know the RS-232 interface protocol, the ASCII command and the micro USB port. However, I would like to receive information on how to connect the RS-232/485 serial port (750-652) to my hardware. My hardware has a micro USB cable.
Why are you asking this question in two threads and in two languages?
I have tried to answer your question already in german in the other thread.
But I will also try to answer it here in english.
I must say, I really don't get, what you want to do. You have a RS232/RS485 module from WAGO, which you want to connect to what? If you want to connext it to a USB/Micro USB cable or a Micro USB cable, that won't work, because even if USB contains the word serial in its name, it is a totally different (serial) technology. What you could do is using a USB/RS232 converter at your PC and connect your RS232 module to it.
 
Zuletzt bearbeitet:
Why are you asking this question in two threads and in two languages?
I have tried to answer your question already in german in the other thread.
But I will also try to answer it here in english.
I must say, I really don't get, what you want to do. You have a RS232/RS485 module from WAGO, which you want to connect to what? If you want to connext it to a USB/Micro USB cable or a Micro USB cable, that won't work, because even if USB contains the word serial in its name, it is a totally different (serial) technology. What you could do is using a USB/RS232 converter at your PC and connect your RS232 module to it.
I want to connect with the stirrer. The stirrer has only a micro USB cable. I have an RS-232 cable to a micro USB cable. One side of the RS232 cable is connected to the 750-652 Wago IO module. Another side micro-USB cable is connected to the stirrer.
i have codesys software.


PC----PLC(750-652)-----RS232 cable to micro USB cable------- stirrer.




wiring


TX- RX


RX-TX


GND-GND


show speed command is r\r\n. pause 0,1 sec. 9600 Baud rate 1 stop bit, No parity, 8 bit

I am using the serial interface library. but I did not get any commands from Stirrer.


PROGRAM PLC_PRG
VAR
wBaudRate: COM _BAUDRATE :=960;
bDataBits: BYTE = 8;
bParity: BYTE = 0;
bFlowControl:COM_FLOW_CONTROL:= NO_FLOW_CONTROL;
i: INT;

COM2: SERIAL_INTERFACE;
xOpenPort2: BOOL;
xInitPort2: BOOL;
xSendActive2: BOOL;
SendString2: STRING := '$72$0D$0A';
ReceiveBuffer2: typRing_Buffer;
ReceiveBuffer2OldIndex: INT;
ReceiveString2: STRING(255);
pReceiveStr2: POINTER TO ARRAY[0..255] OF BYTE;
help2Idx: INT;
iTo2: INT;

TransmitDelayTimer: TON; (* Timer for transmit delay *)
END_VAR

COM2(bCOM_PORT_NR:= 2,

cbBAUDRATE:= wBaudRate,

cbsBYTESIZE:= BS_8,

cpPARITY:= bParity,

csSTOPBITS:= STOPBITS_1,

cfFLOW_CONTROL:= bFlowControl,

utRECEIVE_BUFFER:= ReceiveBuffer2,

ptSEND_BUFFER:= ADR(SendString2),

xINIT:= xInitPort2,

xOPEN_COM_PORT:= xOpenPort2,

iBYTES_TO_SEND:= LEN(SendString2) +1,

xSTART_SEND:= xSendActive2);



(* Display received data for COM2 *)

IF ReceiveBuffer2OldIndex <> ReceiveBuffer2.Index THEN

iTo2:= ReceiveBuffer2.Index - ReceiveBuffer2OldIndex -1;

If iTo2 < 0, then

iTo2:= iTo2 + SIZEOF(ReceiveBuffer2.Data);

END_IF;

If pReceiveStr2 = 0, then

pReceiveStr2:= ADR(ReceiveString2);

END_IF;

FOR i:=0 TO iTo2 DO

help2Idx := (ReceiveBuffer2OldIndex + i) MOD (SIZEOF(ReceiveBuffer2.Data));

pReceiveStr2^ := ReceiveBuffer2.Data[help2Idx];

IF ReceiveBuffer2.Data[help2Idx] = 16#00, THEN

ReceiveBuffer2OldIndex:= ReceiveBuffer2.Index;

END_IF;

END_FOR;

END_IF;






(* Initialize the transmit delay timer.)

TransmitDelayTimer(IN:= TRUE, PT:= T#100MS); (* Set the timer to 100 milliseconds *)

(* Implement delay for transmitting on COM2)

IF xSendActive2 THEN

If not TransmitDelayTimer.Q, then

(* If the timer is not done, do not send data.)

xSendActive2:= FALSE;

END_IF;

END_IF;
 
Zuletzt bearbeitet:
I'm afraid, but what you are trying to do won't work.
The problem is that you don't understand enough about USB. To be honest, even I don't know much about USB, but enough to understand where your problem is.
Via USB you can connect a host and a device. In your case the device is your stirrer, and your host was the USB interface on your PC. In that case everything works fine. But now you want to try to connect the stirrer to an USB/RS232 converter, but unfortunately the converter is also a device and not a host and this doesn't work.
I assume, that, according from your information's, inside the stirrer is a RS232 interface to which a USB/RS232 is connected internally. The only thing you could do, is to contact the manufacturer to see, if you could remove (if exists) this converter and connect it directly.
By the way, please use the code tags, if you want to add code to your posting.
 
Zuletzt bearbeitet:
Zuviel Werbung?
-> Hier kostenlos registrieren
If you connect the stirrer to the PC with a USB A to microUSB cable, an HMI device or a virtual COM port is created on the PC.
This is basically what the RS232 to microUSB adapter does.
However, just because the plugs fit together does not mean that it works.
As oliver.tonn already wrote, the stirrer requires a USB host.

This means that the stirrer must be connected to a Wago controller via USB.
750-8215 and 752-8303/8000-0002, for example, have USB A interfaces.
But now there is the problem of the drivers. Unfortunately, not all drivers are implemented in the firmware. You would therefore have to integrate them with the Board Support Package. If you then have a virtual COM port, you have to integrate it into the CODESYS Runtime, or use it with a Docker image, for example.

All in all, anything but simple.
 
Is it possible to do control with Arduino? ardino with stirrer.

just like a

PC (codesys) --- PLC(RS-485) 750_652 --- rs485 to ttl -- ardino -- ttl to USB 2.0 -- stirrer.
 
In principle yes, there are USB host shields for Arduino available.

But why all the steps when you can do it directly?
PC --- USB 2.0 -- stirrer
instead of
PC (codesys) --- PLC(RS-485) 750_652 --- rs485 to ttl -- ardino -- ttl to USB 2.0 -- stirrer.
 
Zuviel Werbung?
-> Hier kostenlos registrieren
In principle yes, there are USB host shields for Arduino available.

But why all the steps when you can do it directly?
PC --- USB 2.0 -- stirrer
instead of
PC (codesys) --- PLC(RS-485) 750_652 --- rs485 to ttl -- ardino -- ttl to USB 2.0 -- stirrer.
For my thesis, I require a PLC to control the speed of the stirrer.
 
Zurück
Oben