hmwright

Citect Scada Modent Bit Read

4 posts in this topic

Hi team;

I am struggling with a Citect SCADA read of some data. The system is using the "Modnet3" driver over TCP/IP to talk with a system (Modnet 3 as its TCP/IP with first register at 0 and 0 to 15 bits). I am reading the modbus data into variables which is working fine for the analogue values all defined as real in citect.

The Issue I have is that the driver help says I can direct reference a bit in a word, in my case address 45052.1 Holding register 45052 and Bit 1. If I read this as a UINT I get a value of 147 corresponding to bits 1,2,5 and 8.

Citect generates no errors for the tag setup where I define 45052.0 through 45052.15 but all remain as zero in tag lists. 

Any help would be fantastic

Kindest Regards

Howard

Share this post


Link to post
Share on other sites

Hi Wasan;

 

thanks for your input, yes when using the 45052.0 through 45052.15 format the signals were assigned as Digital. 

Share this post


Link to post
Share on other sites

Hi @hmwright I have create test project for MODNET3 bit in word.I have found that bit order on wor device is seperate into 2 block.

I will describe below.

1. Create project with I/O Device to use Modnet3 (If necessary assign device address).

Citect_Modnet_Bit_01.jpg.dcd6d2a21e7e093

2. Create Variable tag with word and bit in word (For Modnet3 address start from 0 and have bit 0 - 15 that means in you need to read device that start address are 400001 you should assign in citect as 400000).

Citect_Modnet_Bit_02.jpg.983d1977930144c

3. Compile and run project when assign word value is 147 then bit 8, 11, 14, 15 are on.

Citect_Modnet_Bit_03.thumb.jpg.02a94a63c

4. That because in Modbus data is arrange data from bit 16 to bit 1

Citect_Modnet_Bit_04.jpg.2eaf58655c9ac04

5. If you need to start with bit 1 you should config parameter [MODNET]RegisterBitReverse from 0 to 1.

Citect_Modnet_Bit_05.jpg.728fa33b73c5f90

6. Select Setup Editor to edit Citect parameter.

Citect_Modnet_Bit_06.jpg.fcd823ac38a16d5

7. Add Section MODNET then edit parameter as shown below then click "Add" button.

Citect_Modnet_Bit_07.thumb.jpg.6aa6b759e

8. Go to File -> Save to save parameter.

Citect_Modnet_Bit_08.jpg.a6db0a6055e2bd9

9. Then Reload parameter and close window screen.

Citect_Modnet_Bit_09.jpg.d2e39c910471c84

10. When run project again for value 147 bit 0, 1, 4 and7 will on.

Citect_Modnet_Bit_10.thumb.jpg.665d18dfa

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now