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.
Posted: 2020-05-09 07:21 PM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-09 07:21 PM
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.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-13 09:20 AM
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:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-06-24 01:03 AM
Hello @Anonymous user
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.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-06-24 01:51 AM
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)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-05-13 12:04 PM
Hi, thanks for they info.... And how can i write no 1 bit? Like bit 4 for MyTag (UInt/int)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-05-13 12:09 PM
Hi, thanks for the info.... And how can i write on 1 bit? Like bit 4 for MyTag (UInt/int)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-05-13 06:31 PM
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)
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.