Search the Community
Showing results for tags 'modbustcp'.
Found 4 results
-
Hello all, I am Vince. I am new OMRON PLC software. I would like someone to teach on how to use these function block. https://www.ia.omron.com/product/special/automation-systems/cp2e/fb/modbus-tcp-server.html https://www.ia.omron.com/product/special/automation-systems/cp2e/fb/ethernet-send-receive-data.html I have go through the manual of the function block but it gives me more confusing. My objective is to read some part of the modbus address. I have doubt on how to set the destination IP address that I would like to read and the modbus address I desired to read. Then where the data is saved in PLC memory. What precaution I need to take upon reading the modbusTCP? Thanks in advance.
-
Twincat3: Can't connect to LabVIEW's Modbus TCP/IP server via Tc2_ModbusSrv library (on virtual PLC)
szlaur.jakub posted a topic in Other PLCs
I am trying to create a simple `Hello World` Modbus TCP/IP program using Twincat3 and virtual PLC (PLC running locally on my computer). I have set up a LabVIEW Modbus TCP/IP master + slave program (both of which are working see screenshots below). I can send data between LabVIEW's master and slave programs. And also read the data from Python script (so I know for sure they are all working). Now I have tried to create a Twincat3 program to set some registers using Beckhoff example What I have tried: - I have tried changing the ipAddr parameter to: 'localhost', '192.168.88.1', '192.168.88.126' - Also I have tried the nUnitID set to: 0, 1, 16#FF (16#FF as specified by Beckhoff docs) This is my Beckhoff code: PROGRAM MAIN VAR ipAddr : STRING(15) := '192.168.88.1'; //Tried also 192.168.88.126 and 192.168.88.1 'localhost' M0 AT %MB0 : ARRAY [0..3] OF WORD; nValue : ARRAY [0..3] OF WORD; fbWriteRegs : FB_MBWriteRegs; bWriteRegs : BOOL; END_VAR IF NOT bWriteRegs THEN nValue[0] := nValue[0]+1; nValue[1] := nValue[1]+1; nValue[2] := nValue[2]+1; nValue[3] := nValue[3]+1; bWriteRegs := TRUE; fbWriteRegs.sIPAddr := ipAddr; fbWriteRegs.nTCPPort := 502; fbWriteRegs.nUnitID := 16#FF; //Tried setting this to 0,1 and it also and didnt work ... fbWriteRegs.nQuantity := 4; fbWriteRegs.nMBAddr := 16#3000; //Tried: 16#3000, 0, 1 fbWriteRegs.cbLength := SIZEOF(nValue); fbWriteRegs.pSrcAddr := ADR(nValue); fbWriteRegs.tTimeout := T#5S; fbWriteRegs (bExecute:=TRUE); ELSE IF NOT fbWriteRegs.bBUSY THEN bWriteRegs :=FALSE; fbWriteRegs (bExecute:=FALSE); END_IF fbWriteRegs (bExecute:=FALSE); END_IF What should I change in my code in order to make this example work? Thank you in advance for any support! Info about LabVIEW programs: I am using the Modbus TCP Master / Slave examples The IP address is set to localhost and the port to 502 (which should match the IP address in my Beckhoff code) I am 100% sure it works because I have also tried connecting to this program via Python script. Picture of my LabVIEW programs: -
Hi All, I'm testing Cx-supervisor communication with ODT Micropower PMAC controller on modbusTCP. I'm able to establish the communication using ModbusTCP driver with cx-supervisor. But, data I'm getting in is Low word first, so not able to convert properly. If anybody has tried any other option/script for this issue? I did not found any setting in Cx-Supervisor as in Kepserver, shown in attachment below: How can we swap the registers read as a 32 bit word from controller? Thank you.
- 1 reply
-
- modbustcp
- 32 bit registers
-
(and 1 more)
Tagged with:
-
Modbus tcp to communicate Quantum to GE Fanuc
misel00 posted a topic in Modicon / Telemecanique / Schneider Electric
Hello everyone! I'm new around, and have been looking for some tips on communications. I need to communicate a Quantum PLC (master) to a GE RX3i. I was thinking on working it out through IOScanning, for it seems the best way to read and write data. On the other hand, I think to download this new config, the PLC must be stopped, so direct messaging seems the alternative. I must say this is my first time actually configuring modbustcp comms, so I want to make sure it works out. The comms are like this: i- Quantum reads a series of variables (holding registers, right?) and uses them for logics and for magelis. ii- Quantum must write very few registers to Fanuc, so if I configure IOScanning with, say, %MW350, will it deposit the data on %R40350? Does this standard addressing mean I actually get the info on %R350? iii- Does direct messaging config require to stop PLC for addition of blocks? This Quantum was programmed on FBD, which I'm really not that familiar with. Please help me, I want to use the most reliable messaging for this are somewhat critical processes.