Codesys 2.3 & Wago - Write and read WORD from I/O modules adress?

spehl

Member
Join Date
Feb 2021
Location
Norrköping
Posts
3
Hello,
I´m using Codesys 2.3 and trying to access Wago I/O modules 750-430 and 750-530 by WORD variable (or maybe an array), unsure if it´s possible or maybe i am doing it wrong!
The DI has adress %IX8.0 to %IX8.7 resp. DO %QX0 to %QX4.7 witch is an WORD, is it possible to write/read an WORD variable to the output resp input, or maybe assign it to and BOOL array, if so what would the approche be?
Any pointers to doing this the right way would be appreciated!
 
Try this..(?)


Var
MyArray1 AT %I* : ARRAY[1..8] OF BOOL;
MyArray2 AT %Q* : ARRAY[1..8] OF BOOL;
End Var

//Link each element of the arrays to each I/O point on your modules.
 
Hej,
%IX8.0 to %IX8.7 is only a byte.
%QX0 to %QX4.7 is.. 5 bytes?
Anyway you can access whole bytes or whole words with %IB, %QB and %IW, %QW respectively.
Array of bools shouldn't work, as bools take up an entire byte.
 
Hej,
%IX8.0 to %IX8.7 is only a byte.
%QX0 to %QX4.7 is.. 5 bytes?
Anyway you can access whole bytes or whole words with %IB, %QB and %IW, %QW respectively.
Array of bools shouldn't work, as bools take up an entire byte.


Hallo und danke :)
Thanks for your suggestion, i have tried different approaches but not getting it to work.
(A miss typo of course it´s - %QX4.0 to %QX4.7)


What i an trying is someting like this:

Wago-1.PNG
 
Hmm... AT is a keyword for the declaration section (top section) it is not used in the declaration section (bottom section)

Either delete line 14 of the implementation AND change line 10 of the declaration to:
bTest AT %QB4 : BYTE;

OR remove just the AT from line 14 of the implementation.
 
Hmm... AT is a keyword for the declaration section (top section) it is not used in the declaration section (bottom section)

Either delete line 14 of the implementation AND change line 10 of the declaration to:
bTest AT %QB4 : BYTE;

OR remove just the AT from line 14 of the implementation.


Thanks so much again!
But unfortunately it does not work, tried both options, gets no build error but the I/O module does not respond.
I even tried to move "bTest AT% QB4: BYTE" to Global variables but it makes no difference either.
Are we sure this works in Codesys 2.3, since we do not see the %QB4 under the device in the PLC_config tab?
 

Similar Topics

Hi, I have never used modbus communication in Codesys 2.3, any tips and tricks are much appreciated. The system is a Wago 750-881 that controls...
Replies
3
Views
1,856
Hello, These days I am trying to implement a communication via EthernetIP between a PowerFlex 525 drive and a WAGO PFC200 with EthernetIP...
Replies
7
Views
1,934
Dear people, Is there any way to use native 3Codesys functionalities within a Wago e!****pit ironpython script? I want for example to export...
Replies
0
Views
933
Codesys Ethernet IP Scanner - Won't connect to a Wago 750-353. The Ethernet device and the Ethernet IP Scanner are both running. but then I go...
Replies
2
Views
1,671
Hello, Maybe it is just a simple problem, but I cannot solve it. I have a Wago 750-881 connected to a Beier HMI through IP TCP, the connection is...
Replies
0
Views
898
Back
Top Bottom