Forum Replies Created
-
AuthorPosts
-
manjey73ParticipantIf the channel type is selected correctly for the input channel, there was a similar problem. It is necessary to update all the databases had something to do with them.
Also had an error in CalcEngine.cs.
Try the same formula on a different computer and a new installation of Scada to verify
manjey73ParticipantThe type of the input channel should be calculated (I do not know how it is in the English version is called)
That is, it should not be data from some device and it should be a formula Val(102)
-
This reply was modified 8 years, 9 months ago by
manjey73.
manjey73ParticipantShow a screenshot of the input channel 102 and specify what type of channel ?
manjey73ParticipantIn the output channel specified formula SetVal(65, Cmd)
In CalcEngine.cs entry looks like this:
public void CalcCmdVal65(ref double cmdVal) { try { BeginCalcCmdData(65, cmdVal, null); cmdVal = Convert.ToDouble(SetVal(65,Cmd)); } finally { EndCalcCmdData(); }}Why do you have so ?
Convert.ToDouble(SetVal(102,1))
manjey73Participant
manjey73ParticipantTo fix the formula, since the formula is incorrect Server will not start.
scada/ScadaServer/Log/scadaServerSVC.logTo see what error and in what line of the file CalcEngine.cs
manjey73ParticipantAll formulas return a double, but to enumerate the possible integer values only.
On; Off; Reset values 0, 1 and 2
; Off; Reset values 1 and 2 appear to have two buttons Off and ResetIn the output channel to be used in the formula Cmd*100 (example)
Or write more complex formula in the database of formulas, call it for example Out_real, and to apply the output channel Out_real(Cmd)Where is Cmd will get the values 0, 1 or 2 and depending on them you will return the desired value.
-
This reply was modified 8 years, 9 months ago by
manjey73.
manjey73ParticipantWhen transferring 10;50.5;101.5 are values, this is the text for the buttons.
The value is precisely 0 , 1 and 2
Need for a control channel to write a formula that will check the value 0,1 or 2 and substitute these values instead of the required 10, 50.5 или101.5
And may also have the formula of permutation bytes, if you work directly with the device. With OPC has faced, may not require.
manjey73ParticipantOur database create different KP for the same type of devices.
Call Number list for each device as well in the database.
When you specify the device Bound and the KP number the Call Number is taken from the database (priority when the flag Bound)
Tab Request Sequence, create a few queries and specify the settings for each device. The binding channels will occur at the number KP, and the signal numbers
manjey73ParticipantJust have devices with the same templates should be different KP in the database
manjey73ParticipantConnecting Devices Using Modbus Protocol
Element parametrs
float(4 bytes)
Byte orders, you must specify your sequence of bytes, for example 2301In the initial group element specifies the starting register in the survey. Depending on the equipment it may be necessary to the starting address add 1
manjey73ParticipantTo work in real-time as the PLC it is necessary to apply the formula in the input channels and use Automatic Control Module.
Unfortunately the module is not able to transmit an arbitrary value, only fixed.
Study the documentation and try to implement their ideas.
Documentation
manjey73Participantping is not related to the operation of the scada system, it can be closed in the firewall.
In this case the SCADA will work fine
July 16, 2017 at 11:12 am in reply to: Login to software with cell-phone browser or another PC #2367
manjey73ParticipantTry to disable the firewall.
July 16, 2017 at 10:51 am in reply to: if variable change value every minute so 1 , otherwise 0 #2365
manjey73ParticipantI have used several formulas to control the state of the PC when reading parameter UpTime via SNMP Protocol.
Need formula Ticks, Ton, NotEquals our database formulas.
The challenge in the formula of the channel NotEquals(Val(602),120000), where Val(602) controlled signal, the time in milliseconds
_______________________________________________
Ticks (Returns the time in milliseconds required for the operation of the timer Ton)
_______________________________________________
public static long Ticks()
{
DateTime now = DateTime.Now;
long time = now.Ticks/10000;
return time;
}
________________________________________________Ton (Timer with delay)
________________________________________________
int[] TonNum = new int[1];
long[] TonST = new long[1];
bool[] TonFlag = new bool[1];
public double Ton(double TonIn, double TonPT)
{
long ET = 0L;
long ton_pt = Convert.ToInt64(TonPT);
bool q = Val(CnlNum) > 0;
bool ton_in = TonIn > 0;int res = Array.IndexOf(TonNum, CnlNum);
if (res == -1)
{
res = TonNum.Length;
Array.Resize(ref TonNum, res+1);
Array.Resize(ref TonST, res+1);
Array.Resize(ref TonFlag, res+1);
TonNum[res] = CnlNum;
}if (!ton_in)
{
q = false;
TonFlag[res] = false;
TonST[res] = 0L;
}
else
{
if (!TonFlag[res])
{
TonFlag[res] = true;
TonST[res] = Ticks();
}
else
{
if (!q) ET = Ticks() – TonST[res];
}
if (ET >= ton_pt) q = true;
}
return Convert.ToDouble(q);
}
______________________________________________________________NotEquals (If the value has not changed within the specified time in milliseconds, then the channel returns 1 if the time is changed, the timer resets)
______________________________________________________________
int[] NotEqualsNum = new int[1];
bool[] valEquals = new bool[1];
double[] valUpTime = new double[1];
public double NotEquals(double UpTime, double PT)
{
bool eq = false;
bool q = Val(CnlNum) > 0;int res = Array.IndexOf(NotEqualsNum, CnlNum);
if (res == -1)
{
res = NotEqualsNum.Length;
Array.Resize(ref NotEqualsNum, res+1);
Array.Resize(ref valEquals, res+1);
Array.Resize(ref valUpTime, res+1);
NotEqualsNum[res] = CnlNum;
valUpTime[res] = UpTime;
valEquals[res] = q;
}
eq = (UpTime – valUpTime[res]) > 0 ;
valUpTime[res] = UpTime;
double tonIn = Convert.ToDouble(!eq);
valEquals[res] = Convert.ToBoolean(Ton(tonIn, PT));
return Convert.ToDouble(valEquals[res]);
}
_________________________________________________________________________2 minutes = 120000 milliseconds
-
This reply was modified 8 years, 9 months ago by
-
AuthorPosts