Forum Replies Created
-
AuthorPosts
-
zzz
ParticipantAgh, timezone in postgres, that’s another can of worm.
Maybe I just try leave it current way. Thanks.
The file archive’s behavior in v6 is new compared to v5, right? (It’s ok, I just should have realize I am looking at a v6, not v5 archive.)I have another question. I have a python script to partially replicate what you did with
ScadaData.dll
in v5 (only archive parsing, current/archive cnldata receiving and command send). With cython the performance is finally on par with the .net dll. But I am having checksum error with a small number of archives.Polling the archive used to be easy – acquiring the .dat file and parse it, only grab the records of the time in range. The the archive disk file layout on v6 seems more fragmented and confusing.
I don’t think I saw anyscadadata.dll
in v6, is there any equivalent code in v6 or a TCP interface document available?Regards
October 26, 2022 at 1:32 pm in reply to: V6, communicator ignores bound channel of integer data type #11432zzz
ParticipantThe issue was debugged on a
project
downloaded from server before I uploaded mine. I suppose that could be HelloWorld ?In the debug process, I setup only 1 bus/device (real modbus tcp device)/channel and tweaked parameters, especially the tagNum and tagCode since they are new stuff, but none got Communicator to recognize the channel number in Device status’s text table. Until I desperately start toggling the data type column.
Double
works after communicator/server restart.In my test project, I setup 77 channels, all as Integer type, none got recognized, until they are all set to
Double
. and they all are immediately recognized by Communicator. By text table I mean the ascii table in device.txtCurrent Data +----+----------+------+-------+---------+ | # | Code | Name | Value | Channel | +----+----------+------+-------+---------+ | **************** Runs **************** | +----+----------+------+-------+---------+ | 1 | C6_RUN | M0 | Off | 7601 | +----+----------+------+-------+---------+ | 2 | C6_ALMR | M1 | Off | 7602 | +----+----------+------+-------+---------+ | 3 | C7_RUN | M2 | Off | 7701 | +----+----------+------+-------+---------+ | 4 | C7_ALMR | M3 | Off | 7702 | +----+----------+------+-------+---------+ | 5 | C8_RUN | M4 | Off | 7801 | +----+----------+------+-------+---------+ | 6 | C8_ALMR | M5 | Off | 7802 | +----+----------+------+-------+---------+ | 7 | F6_RUN | M6 | Off | 2601 | +----+----------+------+-------+---------+ | 8 | F6_ALMR | M7 | Off | 2602 | +----+----------+------+-------+---------+ | 9 | RSV1 | | On | | +----+----------+------+-------+---------+ | 10 | RSV2 | | Off | | +----+----------+------+-------+---------+ | 11 | F7_RUN | M10 | On | 2701 | +----+----------+------+-------+---------+ | 12 | F7_ALMR | M11 | Off | 2702 | +----+----------+------+-------+---------+ | 13 | F8_RUN | M12 | On | 2801 | ....
The
Channel
column used to be all empty. No matter what I do.Regards,
October 24, 2022 at 10:58 am in reply to: Where are those goodies (comm status, toggle comm line cmd) in v6 Channel setup #11372zzz
ParticipantThank you. Will give them a try.
zzz
ParticipantProblem solved. My bad, missing MqttNet.dll.
Since I use the .pdb and .deps.json file as identifiers to identify the target dll files and copy them out, the support dlls are not moved to my final build output folder.
What is the recommended way to collect all the necessary files into a clean separate folder after build each solution ? Like your distributed package does ?
I think the VSCode setup here works just fine on Debian 10.
Except that the default wine 5.0.3 doesn’t work with SA. Alwaysstack overflow
after activating any button or menu that actually start to load the xml file.002d:fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled 002d:trace:loaddll:load_native_dll Loaded L"Z:\\home\\zzz\\repos\\rapidscada6\\scada-v6-master\\ScadaAdmin\\ScadaAdmin\\ScadaAdmin\\bin\\Release\\net6.0-windows\\win-x64\\ScadaWebCommon.Subset.dll" at 0x24cb0000: native 002d:fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled 002d:trace:loaddll:load_native_dll Loaded L"Z:\\home\\zzz\\repos\\rapidscada6\\scada-v6-master\\ScadaAdmin\\ScadaAdmin\\ScadaAdmin\\bin\\Release\\net6.0-windows\\win-x64\\System.Xml.XmlSerializer.dll" at 0x24ce0000: native 002d:fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled 002d:fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled 002d:fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled 002d:err:seh:setup_exception stack overflow 1584 bytes in thread 002d eip 000000007bcd61d3 esp 0000000000130fe0 stack 0x130000-0x131000-0x2b0000 0035:fixme:console:CONSOLE_DefaultHandler Terminating process 2c on event 0
I have other design software using wine 5.0.3. So maybe I just leave it that way and use VM instead.
zzz
ParticipantHi, thanks for the guide. I downloaded the source from mik’s rapidscadav6 repository on github yesterday.
I saw the
EnableWindowsTargeting
has already been set to true. Thus I just skipped most of editing steps, including referencingMicrosoft.NETFramework.ReferenceAssemblies
inScadaCommon.Svc.csproj
(since this file doesn’t seem to exist in my downloaded version)Jump to the compilation step. The process worked most of the time, except for ScadaAdmin which complained about some
host
can only run on windows etc.Just now I find that the MQTT related plugin UI are not working ScadaAdmin (other modules’ views work just fine). I am not sure if this is related.
Comparing the dlls from project I compiled and released beta v6 package on this forum. I find missing files from my builds includingDrvCnlBasic.Common.dll DrvDsScadaServer.Common.dll ModArcBasic.Common.dll ModArcPostgreSql.Common.dll
The above items’s GUI in ScadaAdmin seems to work ok. Did I do anything wrong ?
Any idea why none of my built mqtt related modules’s GUI work?Message in text: messagebox:{title:
Error
, message:Unhandled Exception
}zzz
ParticipantAfter the log folder is
chown
ed, I can see scadaweb.log now, but 99% of it seems from Rapidscada’s web frontend, mostly sutff like belowScada.ScadaException: Error getting view with ID=238 from the cache: The view is not found in the cache
at Scada.Client.ViewCache.GetViewFromCache (System.Int32 viewID, System.Boolean throwOnFail) [0x0008f] in <bed4d89bd9d74517a
be54cd0f8c8e979>:0
at Scada.Web.ClientApiSvc.GetViewFromCache (System.Int32 viewID, Scada.Web.UserRights userRights) [0x00026] in <ba66a674522d
470295eecd6524152467>:0
at Scada.Web.ClientApiSvc.GetCnlList (System.String cnlNums, System.String viewIDs, System.Int32 viewID, Scada.Web.UserRight
s userRights) [0x00032] in <ba66a674522d470295eecd6524152467>:0
at Scada.Web.ClientApiSvc.GetHourCnlData (System.Int32 year, System.Int32 month, System.Int32 day, System.Int32 startHour, S
ystem.Int32 endHour, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Boolean existing, System.String
dataAge) [0x0000e] in <ba66a674522d470295eecd6524152467>:0
2022-04-12 20:56:00 <wsta00><www-data><EXC> Error getting view with ID=238 from the cache: The view is not found in the cache:
Scada.ScadaException: The view is not found in the cache
at Scada.Client.ViewCache.GetViewFromCache (System.Int32 viewID, System.Boolean throwOnFail) [0x00049] in <bed4d89bd9d74517a
be54cd0f8c8e979>:0
2022-04-12 20:56:00 <wsta00><www-data><EXC> Error getting events by the filter where channels= , view id=238:
Scada.ScadaException: Error getting view with ID=238 from the cache: The view is not found in the cache
at Scada.Client.ViewCache.GetViewFromCache (System.Int32 viewID, System.Boolean throwOnFail) [0x0008f] in <bed4d89bd9d74517a
be54cd0f8c8e979>:0
at Scada.Web.ClientApiSvc.GetViewFromCache (System.Int32 viewID, Scada.Web.UserRights userRights) [0x00026] in <ba66a674522d
470295eecd6524152467>:0
at Scada.Web.ClientApiSvc.GetCnlSet (System.String cnlNums, System.String viewIDs, System.Int32 viewID, Scada.Web.UserRights
userRights) [0x00040] in <ba66a674522d470295eecd6524152467>:0Not sure why, I haven’t seen crash yet after the change, will post log once it crashed again. Thanks.
zzz
ParticipantHi Mik,
I can
touch /opt/scada/ScadaWeb/log/tmp.1
. So I looked around and noticed thatmod-mono
is running aswww-data
. Do you mean I shouldchown -R www-data ...../log
?One thing I forgot to the mention, the mod-mono’s RAM use is low but the CPU is now most of the time 80~140% (this is a two core node, 100%=1core). ScadaServer 10~20% (not constant), ScadaComm 20~40%.
Ok, I will try once I have VS2022 install. Thanks.
zzz
ParticipantHi Mik,
Odd enough,
/opt/scada/ScadaWeb/log/ScadaWeb.log
doesn’t exist :-(./opt/scada/ScadaWeb/log/
is empty. Does it need further configuring ?I don’t have a system monitor tracking the server, not sure what the ram look like at the moment of the crash. But in my past observation, it seldom exceeds 50%, usually 30~45%
Is v6 in beta now ? I’d like the give it a try if so. Is there any compile guide for dotnet-core noobs?
I think it really a good idea to move away from mono, the resources for mod_mono is getting really scarce…
Regards
zzz
ParticipantThanks, that’d be really nice!
zzz
ParticipantNot sure about PostgresSQL, but I tried TimescaleDB which is postgres based. The lesson I have learnt is that I should have use influxdb2 in the first place.
The timescaledb database exploded in size very quickly in 2 weeks (first sync all archive (600chs/30s, 1+year), then 600chs/5s live insertion left on for days), tried all compression tricks mentioned in doc (I re-created and re-imprted the data archive several times taking hours and hours just to make sure, I didn’t mis-operate), nothing helped much. The size droped
by
2/3 when switched to influxdb2, and the increament in size also slowed down. After all data in RapidScada archive has been imporpted via socketapi into Influxdb2 the size is bigger than RS’s native format, but not so much – not at all, considering the tradeoff for the abiltiy to use the advanced timeseries analytic queries and customized downsampling.I use postgresql very often, I have nothing against it, This is just a friednly aheadsup for my wasted 1 week in dealing with this mess. Maybe a benchmark or some reasearch on scalablity on the setup will turn out to be benificial.
Timescaledb’s insertion speed is notably faster c.f. influxdb2 in my test. The query performance was initally on par after the db has the right partitioning, but performance decreases notably for some query when the size quicly become unmanagable…
zzz
Participant就是没有值,指定时间的数据集没有采集到这个指标的值,通讯出错之类的。
可能是因为Double类型不能为空,所以用此状态表示读数无意义,
若没记错公式计算值若无意义,需要设置Undefined状态,否则即使返回NaN,界面照样显示为0。zzz
ParticipantThank you. That worked.
I used a epoch timestamp formula
private static long EpochTicks = (new DateTime(1970, 1, 1)).Ticks; public static double DateTime2Epoch(DateTime dt){ return (dt.Ticks - EpochTicks )/ TimeSpan.TicksPerSecond; }
and set channel 65535’s formula to
DateTime2Epoch(DateTime.Now)
zzz
ParticipantHi Mik,
No, I tried to avoid changing that, I mean when adding many new registers. The defaul is always the same.
zzz
ParticipantThe thing I found most tedious is changing data types. It feels like the editor is fighting with you, since it doesn’t remember your last register datatype, nor is there any way to change them in batch.
If the region is full of float data, one has to keep correcting the data type all along the way. Other than that, for me, it worked just fine.zzz
ParticipantTalking about Modbus, starting address can be the same for Coils and Holding Registers, for example.
Indeed. In that case, maybe adding group id, e.g. 1.1, 1.101 and 2.1, 2.101 to seperate address from different groups is a solution.
I think, we will improve Modbus Template Editor to simplify manual operations.
The best thing I like this Template Editor instead of editing xml directly is the auto addressing, that’s like a address calculator. You just keep clicking [+] tens of times, which is kind of tedious, but I accept the trade-off :-D.
-
AuthorPosts