Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84781members
354227posts

Citect scada 2018 Word type

AVEVA Plant SCADA Forum

A support forum for AVEVA Plant SCADA (formerly Citect SCADA). Share new and exciting product information, connect, learn, and collaborate with the ecosystem of Plant SCADA Users. AVEVA Plant SCADA a reliable, flexible and high-performance Supervisory Control and Data Acquisition software solution for industrial process customers. This forum is to connect, share, learn and collaborate new and exciting product information. Feel free to join and share to your Ecosystem of Plant SCADA Users.

Hamza189
Cadet
0 Likes
6
3318

Citect scada 2018 Word type

Hi, i am connecting my M580 to my Citect scada 2018 and i wanna pass along a word type and don't seem to find it in citect scada so i am wondering if i chose Real type will it pass the exact value or change it somehow.. i can't check with the simulations that is why i need to know since i am still early on in the project.

 

Thank you.

6 Replies 6
Eric_Coudurier
Lt. Commander Lt. Commander
Lt. Commander
0
3274

Re: Citect scada 2018 Word type

WORD type doesn't exist as Type of Tags in Citect SCada. Depending what you want to do with the variable read from the M580, you can choose any 16 bits type ( 2 bytes long). see the table here after:2020-05-13_18-13-00.png

RichardJavangwe
Cadet
Cadet
0 Likes
4
3186

Re: Citect scada 2018 Word type

Hello @Hamza189 

 

If you are certain that your  WORD value will not exceed 32,767 then in your M580 code use the WORD_TO_INT function then send the resulting INT to Citect. You can also use WORD_TO_REAL or WORD_TO_UINT, all depends on the limits of the value you are reading and you can select the appropriate data type in Citect that caters for it.

All generalizations are false
Tags (2)
Eric_Coudurier
Lt. Commander Lt. Commander
Lt. Commander
3
3177

Re: Citect scada 2018 Word type

Hi,

There is no need to change the type in Control Expert, you can let the WORD type. In Citect define a type with UINT and the address on the Control Expert variable type WORD and that's it. 
Normally when you use a WORD format in Control Expert, it is to use Bits inside.
They can be extracted in Citect with the BITAND function. If you need to read the bit 4 of a tag named MyTag (type UINT, mapped on a Control Expert variable type WORD), the function will be MyTag BITAND 0x0010. It can be used for animation, alarms or to set a DIGITAL Tag variable (Address will be MyTag BITAND 0x0010)

 

Tags (1)
Xavhiii
Crewman
Crewman
0 Likes
0
2109

Re: Citect scada 2018 Word type

Hi, thanks for they info.... And how can i write no 1 bit? Like bit 4 for MyTag (UInt/int)

Tags (1)
Xavhiii
Crewman
Crewman
0 Likes
1
2107

Re: Citect scada 2018 Word type

Hi, thanks for the info.... And how can i write on 1 bit? Like bit 4 for MyTag (UInt/int)

Tags (1)
trowe
Crewman
Crewman
0
2082

Re: Citect scada 2018 Word type

Xavhii,

 

Basically you need to to BITAND/BITOR instructions to set/reset the bit of a word

 

I usually use a Cicode function that I pass the Tag value, the bit number and the state I want to change the bit to

 

 

INT FUNCTION LEB_writebit(INT iOldVal, INT iBit, INT bVal)

    INT iNewVal;

    IF bVal = 1 THEN
        iNewVal = iOldVal BITOR Pow(2,iBit);
    ELSE
        iNewVal = iOldVal BITAND ( 0xFFFF BITXOR Pow(2,iBit));
    END!IF

    RETURN iNewVal;


END

 

 

 

 

Then, on a button or whatever, if I want to set bit 4 of Tag "Tag1"  I would use

 

Tag1 = LEB_writebit(Tag1, 4, 1)

 

Tags (1)