Jump to content

Help understand a piece of program


Recommended Posts

Hi,

 

A friend asked me to modify him a scada software, he wants to change some controls. The scada software comunicates by modbus with a V120 which is conected to a V130.

The person who wrote the program is unreachable and he didnt leave any comments in the program. At least there is a subrutine named Scada.

At the begining of the subroutine is this piece of program that I don't understand what it does (see attachment).

If someone can explain me what is going on there I would be greatefull.

Thank You.

 

Best Regards.

post-16999-0-77993600-1384195494_thumb.jpg

Link to comment
Share on other sites

Hi nkwai,

 

It is very hard to determine just from the one net.  The MODBUS scan means the controllers is a MODBUS slave.  The reset looks like there is data that is being stored in a bit map and the programmer is using num to bit and bit to num to convert between decimal format and binary format but it is difficult to see much else.  If you need any help understanding the program please feel free to send an email to support@unitronics.com.  

 

Regards,

 

Ryan

Link to comment
Share on other sites

Ok, after some hours I think I understood what it does.

The first 20 bits of DW3 covers the digital imputs from I2 to I20

The bits of DW6 covers the MB from 340 to 371

And the bits of DW4 covers the MB from 300 to 331

And the three DW are use to comunicate with the scada software

Now I just need to find the "pinout" of the three DW.

I think this was used as a workaround for the 24 tag limit of the licence, this way only 3 tags are consumed.

Link to comment
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
×
×
  • Create New...

Important Information

Confirm to continue.