CitectSCADA, WAGO 750-841 and variable tag

bob_pgh

Member
Join Date
Apr 2010
Location
Pittsburgh, PA
Posts
5
Hello everyone. I was hoping someone could help me out or point me in the right direction in regards to using CitectSCADA with the WAGO 750-841.

I have successfully configured the Citect software with my IO device. I have set up IO device and downloaded the application to the device that has quite a few output variables that I would like to show in Citect.

The problem that I seem to be having is the following:

To just do a test, I created a variable tag in Citect that has the following configuration:

variable tag name: total
cluster name: test_cluster
i/o device name: wago_io
address: 40001
data type: digital

So then I set up a simple text box on the page that references this variable tag.

The problem I am getting is I would like it to show the count that is stored in the output variable in the WAGO controller and not just a 1 or a 0. It shows a 1, when I have 24V on the 1st module, 1st input.

How can I get the Citect software to show the total instead of just 1 or 0?

Thank you in advance.
 
No, this is what I have. There are many selections and after reading a few places in the Citect Manual, this is the one that I finished with.

Here are the selections:

BCD
BYTE
DIGITAL
INT
LONG
LONGBCD
REAL
STRING
UINT
ULONG

I have tried UINT, INT, DIGITAL, ULONG and LONG with the same results...0 or 1.

The WAGO program on the controller has the variables and the variable that I am trying to display is stored on the WAGO as a DWORD (%MD0: DWORD). Not sure if this lends to the problem or not, but this is the value that I need to display.

Thanks for the quick reply. Any other thoughts?
 
Hello,

I am confused.

40001 is a MODBUS reference to the first 'holding register.' Each holding register is 16 bits.

A normal programming operation when examining memory that is not a single bit, a byte, word, etc., is if the memory location is not zero (0) then it is considered true. And many programs represent true as 1 and false as 0.

Since not equal to 0 is true then -1 can be considered true.

All that leads to you have declared the type as digital and you are getting a true or false (0 or 1), that leads to the software 'casting/converting' the word reference (40001) to a digital.

So the first thing is the type needs to be changed to an analog type. Set it to INT for now. Having a data type 'digital' that maps to 40001 is not logical.

IIRC Wago has overlapped MODBUS mapping. If you are reading the first word of data and that is physical digital input area that is the error. (I just looked in the manual and it is overlapped memory. Meaning the MODBUS function code defines if bits or words are accessed.)

You say "output variable in the WAGO". A physical output? They start at like 512, IIIRC.

You say "when I have 24V on the 1st module, 1st input." Is this input digital or analog and why does that reference the "output variable in the WAGO?"

So, correct the data type to INT and then check that you are mapping to the correct Wago <-> MODBUS address.

I think there is some confusion on what is mapped and how in the WAGO. IIRC, %MD0 points to the first double word of the physical input memory. And if you are only changing the first input, and it is digital, then all you will get is 0 or 1. If you changed only the second input you would get 0 or 2, third 0 or 4, etc.


Good luck,

Mark
http://www.peakhmi.com/









 
Mark,

I have sent you the screenshots of the Codesys code that shows you the output variable that I would like to display. It is an input that is stored to a channel register. I am not sure if I am explaining this correctly because I am fairly new to this all, but learning alot as I go.

Does this help to explain what I am looking to display? If not, let me know. I will go and change it to INT and see what I can do.

Thanks!

sample.jpg sample 2 (running).jpg
 
Hello,

OK that makes more sense.

I assume Citect supports MODBUS 6 digit addressing.

According to: http://www.wago.com/wagoweb/documentation/750/eng_manu/841/m0841qs1e.pdf

%MD0 would start at 412288 and the data type would be ULong or Long and would be 2 registers long.

%MD0 = 412288 - 412289

IIRC using %MD1 would be trouble. %MD1 = 412289 - 412290, would give overlap.

Should use:
%MD0 = 412288 - 412289
%MD2 = 412290 - 412291
%MD4 = 412292 - 412293
etc.

So, change the type and change the reference address and it should work.

Good luck,

Mark
http://www.peakhmi.com/
 
Thank you Mark. I think I understand what you are talking about now. It makes sense after reading it over. I can change the variables to M0, M2, etc. That is not a problem.

The problem is, i do not see a way to put an address like this into CitectSCADA variable tag declaration. If I change the address to 412288-412289 it does not compile.

I will look into this some more, but what you said makes sense. If I figure this out tonight, I will post.

Thanks again for all your explanations.
 
Hello,

> put in 412288

Right, that is why I said "...start at 412288." A double word reference, %MD, uses two registers. Citect knows this from the declared data type.

Your welcome,

Mark
http://www.peakhmi.com/
 

Similar Topics

Hello everyone! I have a question about the allowable syntax for an expression in CitectSCADA. If I wanted an advanced alarm to trigger based on...
Replies
2
Views
944
Hello, Just wondering if it is possible to make internal CitectSCADA project tags available to an OPC server. (Schneider OFS). There are...
Replies
0
Views
926
Hello, This may not be the place for this but im curious of anyone has worked with CitectSCADA 2018 and windows sessions. Any feedback would be...
Replies
0
Views
1,593
Hi Guys, I am still trying to learn citectscada and curious about the how the hmi stores the alarms (active, historical, etc). I could see a...
Replies
1
Views
1,263
I want to make an application in C# .Net to read Tags from CitectScada (Local variables, Variables tags, Digital Alarms ...) so that I can process...
Replies
1
Views
1,607
Back
Top Bottom