Forum Replies Created
-
AuthorPosts
-
manjey73
ParticipantOur 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 numbersmanjey73
ParticipantJust have devices with the same templates should be different KP in the database
manjey73
ParticipantConnecting 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
manjey73
ParticipantTo 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.
Documentationmanjey73
Participantping 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 #2367manjey73
ParticipantTry to disable the firewall.
July 16, 2017 at 10:51 am in reply to: if variable change value every minute so 1 , otherwise 0 #2365manjey73
ParticipantI 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
manjey73
ParticipantIP/scada from local network
To configure NAT on the router. For example, port 9090 to port 80 for IIS.
Static IP:9090/scadaOr port 8084 to 8084 port for mono-xsp4 on Linux
Static IP:8084/scadaJuly 9, 2017 at 11:22 am in reply to: How to create navigation link for navigating through different pages? #2346manjey73
ParticipantIf not mistaken, this functionality is not currently implemented and planned in the future.
manjey73
ParticipantTo be able to send commands to the device after executing the formulas in the input channels required Automatic Control Module
manjey73
ParticipantCan also change the display number according to British standard (11.5 instead of 11.5) at the same time leave the localization.
Unfortunately I don’t remember how I did it somewhere recorded, but could not find it.
Then, too, everything starts to work.manjey73
ParticipantThe features of the processors other devices (Little Endian o Big Endian)
Features of the sequence of bytes in the organization of the data transferWell, we don’t all speak the same English 🙂
I use online translation to learn examples in English as well as writing in the English forum.manjey73
ParticipantOptions for Standard commands to use formulas for IEEE (float)
Add to base formula
public double fRevers (int rev)
{
float q = Convert.ToSingle(CmdVal);
byte[] f = new byte[4];
byte[] o = new byte[4];
f = BitConverter.GetBytes(q);
Array.Copy(f,0,o,0,4);
if (rev == 1)
{
Array.Copy(f, 0, o, 1, 1);
Array.Copy(f, 1, o, 0, 1);
Array.Copy(f, 2, o, 3, 1);
Array.Copy(f, 3, o, 2, 1);
}
Array.Resize(ref o, 8);
Double ou = BitConverter.ToDouble(o,0);
return ou;
}Use the formula in the control channel – fRevers(1) Command type Standard, suitable for some Modbus devices.
Or try to use this formula
LINK{ buf[1], buf[0], 0, 0, 0, 0, 0, 0 }and change the variable type on input
ushort val = (ushort)Cmd;manjey73
ParticipantTicks
————————————
public static long Ticks()
{
DateTime now = DateTime.Now;
long time = now.Ticks/10000;
return time;
}
———————————–You want to work Ton
-
This reply was modified 8 years, 3 months ago by
manjey73.
manjey73
Participanthttps://github.com/Manjey73/OpnenKPs/tree/master/KpRpi3 (readme – online translate)
https://github.com/Manjey73/OpnenKPs/releases/tag/KpRpi3 (use gpio 5-27, in archive use all gpio) -
This reply was modified 8 years, 3 months ago by
-
AuthorPosts