RapidScada / scada

Contains Rapid SCADA sources
Apache License 2.0
680 stars 311 forks source link

I developed Modbus.dll to get bits from byte of holding registers #64

Closed fmarslan closed 6 years ago

fmarslan commented 6 years ago

how to use :

Step 1 : ElementGroup type selected Holding Registers Step 2 : ElementType selected bool Step 3 : We will write bitoffset value to Bit Offset Input Text

circler3 commented 6 years ago

Please PR to develop branch, Thank you.

fmarslan commented 6 years ago

changed to develop branch

2mik commented 6 years ago

That's interesting! Could you show some screenshots of the new features?

fmarslan commented 6 years ago

this approach use with modbus usually that I needed it

we want data type of coil but register type of holding register on modbus register so we need this solution

Example

one holding register(for example ushort) (this can uint32, long, etc.) value : 0010000000101010

settings for bool type settings

settings for other type settings-2

Result result

2mik commented 6 years ago

Currently, this operation can be done by a formula in the configuration database. I agree that retrieving a bit in Communicator may be useful for a user to easily monitor data at testing phase. At the same time, if you decide to implement this feature, it is needed to make possible to extract all the bits from 16 bytes Modbus value. Because many devices provide some kind of flag register that contains many meaningful bits.

May be there should be a bit mask (like 0001000100010001) if ushort is chosen, and for each bit a separate tag is created.

I will approve merging the changes in the project if you would like to expand your idea and implement more general approach. In this case, it's better to start a new *.prj in VS, like KpModbusFlex (or other name you like). Use KpModbus.dll as a reference to avoid duplicating the code. And when it is ready and tested, create a pull request in this special repository. We could discuss the development on https://forum.rapidscada.org/ There are many users who can give valuable advice.

2mik commented 6 years ago

The community Rapid SCADA repository is a good place to play and test new ideas whether they are useful for many people or for a single case.

2mik commented 6 years ago

@fmarslan , if you could share Turkish localization of the Webstation app, this would be nice. Many people from Turkey download Rapid SCADA.

fmarslan commented 6 years ago

I observed this solution some apps and providing easy tag define also u are right we could discuss the development but I had a urgent need this solution and when I research all suggestions, everyone suggested formulas. my need is be to easily monitor data at testing phase so I developed this solution.

I want committed for other people use it

If you want, I can create new project but my suggestion is single project because this approach use often.

I can share the Turkish localization of the Webstation application at convenient time

by the way I'm using RapidScada in a big project and I'm developing a module for rapidscada server that the module can use for restfull api sync. I will publish when It finished but I will can not write detailed documentation for the module

2mik commented 6 years ago

I want committed for other people use it

If you want, I can create new project but my suggestion is single project because this approach use often.

Yes, please create a project and pull it to https://github.com/RapidScada/scada-community

I can share the Turkish localization of the Webstation application at convenient time

That's would be great. Commit to the develop branch.

I'm developing a module for rapidscada server that the module can use for restfull api sync.

Do you use WCF or other technique for REST API? Will it work on Linux by Mono?

2mik commented 6 years ago

I'm using RapidScada in a big project

Could you tell little more about the project?

fmarslan commented 6 years ago

Could you tell little more about the project?

sorry I cannot tell more about project due to company rules

Do you use WCF or other technique for REST API? Will it work on Linux by Mono?

No problem! because I'm using ubuntu OS on server

Yes, please create a project and pull it to https://github.com/RapidScada/scada-community

I will close this PR and create new PR