June 28, 2016 at 10:21 am #1359ramboParticipant
I have got some success simulating a channel for temp reading, As far as I see, the communicator device data table displays all values in decimal format.
that means raw values ( modbus TCP ) massage is decoded and converted into decimal.
I have add Getbyte formula ( as suggested by Mikhail in other query)
public double GetByte(double val, int n)
UInt64 uintVal = (UInt64)val;
return (uintVal >> (n*8)) & 0xFF;
I am trying to read byte bye means of putting Getbyte(Cnl,0) in formula of input channel.
Scada server restart shows error
2016-06-28 15:25:34 <****><SYSTEM><ERR> Error compiling the source code of the formulas:
Line 429, column 55: error CS0103: The name ‘Getbyte’ does not exist in the current
Also I have tried with GetBit (Cnl, 0)
2016-06-28 15:25:48 <*****><SYSTEM><ACT> Formulas are read from the configuration database
2016-06-28 15:25:49 <*****><SYSTEM><ERR> Error compiling the source code of the formulas:
Line 429, column 55: 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
2016-06-28 15:25:49 <*****><SYSTEM><ERR> Normal program execution is impossible.
2016-06-28 15:29:21 <******><SYSTEM><ACT> ScadaServerService is stopped
Where I am doing the mistake…..
I am trying to capture the actual massage bytes and bits.
Regards,June 28, 2016 at 2:46 pm #1360MikhailModerator
Function and variable names are case sensitive. Check it.June 29, 2016 at 11:36 am #1371ramboParticipant
You are right ….
Its working now… thanks a lot.September 11, 2017 at 2:14 pm #2547manrajParticipant
I having trouble running my addition codes in SCADA,I am looking to take a value from the MODbus operator as an input value for this codes.
* C# Program to Get a Number and Display the Sum of the Digits
static void Main(string args)
int num, sum = 10,
while (num != 0)
num = num / 10;
sum = sum + num;
Please show me an example of a simple addition coding to test it in the scada configuration.I have a basic level C# coding only.September 11, 2017 at 4:04 pm #2548MikhailModerator
Please create a new topic and describe what calculations you need.
- You must be logged in to reply to this topic.