Forum Home › Forums › Understanding the Software › check the status of one or more bits in 2 bytes
- This topic has 9 replies, 2 voices, and was last updated 7 years, 10 months ago by
jeeslo.
-
AuthorPosts
-
November 6, 2015 at 1:55 am #662
jeeslo
ParticipantAccording to the table below 16 bit where 1 is closed and contactor open contact 0
bit 0 Red connected.
bit 1 Group connected.
bit 2 Group connected redundant.
bit 3 Group redundant prepared.
bit 4 Group redundant available.
bit 5 redundant Group is based.
bit 6 Start O (external demand).
bit 7 Request redundant group as a base.
bit 8 Petition based group.
bit 9 Priority Group.
bit 10 Reception / remote alarm reset.
bit 11 Auxiliary Service 1 connected.
bit 12 Service 2 auxiliary connected.
bit 13 Auxiliary Service 3 connected.
bit 14 connected auxiliary service.
bit 15 Auxiliary Service 5 connectedThe decimal value that gives me such SCADA 65014 communicator is so serious that in binary 1111110111110110. My problem is that the state is variable or SCADA comunicator changing and can be many combinations in decimal and I want to present in the SCADA-scheme editor each of the separate state, but not how to make it happen in the SCADA-scheme editor! or condition use! or formulas to extract the state of each bit … sorry I do not understand how to do it
November 6, 2015 at 7:50 am #669Mikhail
ModeratorHi,
You need a one input channel of type Real for the value received from a device. Then you should create a separate input channel of type Calculated discrete for the each value. Use such formula for those channels:GetBit(Val(1),2)
where 1 – the Real channel number, 2 – bit index
November 6, 2015 at 8:03 pm #674jeeslo
ParticipantHello Mikhail
I used the formula that you mention:
GetBit (Val (1), 2)
But when you turn the formula around the entire communication is disabled, apparently the variable “GetBit” the problem is to remove only this line the system recovers again. The test did in version 4.4 and 4.5 and is the same problem.
Below is a sample image
http://postimg.org/image/8e82s69zl/
-
This reply was modified 7 years, 11 months ago by
jeeslo.
November 7, 2015 at 6:57 pm #676Mikhail
ModeratorHi,
Sorry, I didn’t catch what the problem is? Could you give an additional example, please?November 9, 2015 at 12:04 am #677jeeslo
ParticipantHello Mikhail!
I have a Generator-Electric which communicates with the Modbus protocol to the SCADA-comunicator where the value received is (16bit) this value changes depending on the variety of states. The problem is to work with the state of each binary bit and seeing it so clear to working with the representation in Scada-Sheme.
I must make use formula?
Status Table:
bit 0 Red connected.
bit 1 Group connected.
bit 2 Group connected redundant.
bit 3 Group redundant prepared.
bit 4 Group redundant available.
bit 5 redundant Group is based.
bit 6 Start O (external demand).
bit 7 Request redundant group as a base.
bit 8 Petition based group.
bit 9 Priority Group.
bit 10 Reception / remote alarm reset.
bit 11 Auxiliary Service 1 connected.
bit 12 Service 2 auxiliary connected.
bit 13 Auxiliary Service 3 connected.
bit 14 connected auxiliary service.
bit 15 Auxiliary Service 5 connectedNovember 9, 2015 at 7:28 am #679Mikhail
ModeratorHi,
Does GetBit function work? If not, what are the symptoms?November 18, 2015 at 12:24 am #714jeeslo
ParticipantHi Mikhail
The “Get Bit” function does not work me, when active formula in the Scada-Administrator as you suggest happens that the Scada-Comunication and Scada-Server stop working. Below error log
Scada-Comunicator LOG:
2015-11-17 18:11:24 <LM-SRVSCAD-V><SYSTEM><ACT> Disconnect from SCADA-Server
2015-11-17 18:11:44 <LM-SRVSCAD-V><SYSTEM><EXC> Error connecting to SCADA-Server: You can not make a connection because the target machine expressly rejected that connection 127.0.0.1:10000Scada-Server LOG:
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ACT> ScadaServerService is started
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ACT> Module is loaded from the file C:\SCADA\ScadaServer\Mod\ModAutoControl.dll
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ACT> Check the existence of the data directories is completed successfully
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ACT> Check the existence of the configuration database files is completed successfully
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ACT> Input channels are read from the configuration database. Active channel count: 320
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ACT> Ouput channels are read from the configuration database
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ACT> Users are read from the configuration database
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ACT> Formulas are read from the configuration database
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ERR> Error compiling the source code of the formulas:
Line 452, column 57: error CS0103: The name ‘GetBit’ does not exist in the current context
See the file C:\SCADA\ScadaServer\Log\CalcEngine.cs with the source code
2015-11-17 18:17:59 <LM-SRVSCAD-V><SYSTEM><ERR> Normal program execution is impossible.November 18, 2015 at 7:21 am #715Mikhail
ModeratorHi!
GetBit appears since Rapid SCADA v.4.5
I think you have tried to use this formula in v.4.4November 18, 2015 at 8:58 am #716Mikhail
ModeratorYou can import C:\SCADA\BaseDAT\formula.dat from the distributive v4.5 using SCADA-Administaror. It contains GetBit function.
November 18, 2015 at 2:32 pm #725jeeslo
ParticipantHi Mikhail!! good news
This is the problem!!!!
It turns out that I tested with 4.4 and 4.5 but not working. Then there are 2 different versions 4.5.0.3 and 4.5.0.5 with the latest version works perfectly if you bring this GetBit.
Thank you very much for your attention and resolving closed topic
-
This reply was modified 7 years, 11 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.