Forum Home › Forums › Communicating with Devices › OPC › OPC write value issue-IBH opc server
Tagged: OPC write data
- This topic has 97 replies, 3 voices, and was last updated 4 years, 8 months ago by Mikhail.
-
AuthorPosts
-
October 6, 2018 at 12:07 am #4353mariodavidParticipant
the manufacturer wrote: “I would think that installing the OPC Foundation OPC Analyzer as a go-between between Rapdid Scada and the Server would give them all the information that is needed”.
How can i get the OPC analizer?
October 7, 2018 at 7:21 am #4357MikhailModeratorMe and Google have no idea. I found this free tool that may be useful.
October 7, 2018 at 7:23 am #4358MikhailModeratorOctober 9, 2018 at 4:23 pm #4373mariodavidParticipantI use opc analyzer with quick ckient and rapid scada. this is the log.
first, quick client:
“OPC Analyzer Trace – Application Version 1.2.1012
saved on mar 9. oct 12:09:15 201812:08:35.437 – IOPCSyncIO::Write —————————————————————-
General:
GroupName: PLC1.Generic
GroupServerHandle: 0x5721688
HRESULT: 0x00000000 S_OKIn Parameters:
pItemValues:
[000] VT_BOOL -1
dwCount: 1
phServer:
[000] 0x06895348Out Parameters:
ppErrors:
[000] 0x00000000 S_OK12:08:35.967 – IOPCDataCallback::OnDataChange —————————————————
General:
HRESULT: 0x00000000 S_OK
GroupName: GRP06897320
numCallbacks: 10
minTime: 54.974 ms
averageTime: 134.769 ms
GroupServerHandle: 0x302398
maxTime: 508.228 ms
CallTime: 101.790 msIn Parameters:
hrMasterquality: 0x00000000 S_OK
pvValues:
[000] VT_BOOL -1
[001] VT_BOOL -1
[002] VT_BOOL -1
dwCount: 3
hrMastererror: 0x00000000 S_OK
pftTimeStamps:
[000] 2018-10-09T16:08:35.608
[001] 2018-10-09T16:08:35.718
[002] 2018-10-09T16:08:35.718
dwTransid: 0
phClientItems:
[000] 0x00000008 [001] 0x0000000b [002] 0x00000013
hGroup: 0x0
pwQualities:
[000] 0x00c0 OPC_QUALITY_GOOD
::::
[002] 0x00c0 OPC_QUALITY_GOOD
pErrors:
[000] 0x00000000 S_OK
::::
[002] 0x00000000 S_OK12:08:36.014 – IOPCDataCallback::OnDataChange —————————————————
General:
HRESULT: 0x00000000 S_OK
GroupName: PLC1.Generic
numCallbacks: 11
minTime: 0.139 ms
averageTime: 0.429 ms
GroupServerHandle: 0x5721688
maxTime: 2.238 ms
CallTime: 0.192 msIn Parameters:
hrMasterquality: 0x00000000 S_OK
pvValues:
[000] VT_BOOL -1
[001] VT_BOOL -1
[002] VT_BOOL -1
dwCount: 3
hrMastererror: 0x00000000 S_OK
pftTimeStamps:
[000] 2018-10-09T16:08:35.718
[001] 2018-10-09T16:08:35.608
[002] 2018-10-09T16:08:35.718
dwTransid: 0
phClientItems:
[000] 0x003d4608 [001] 0x003d42f8 [002] 0x003d4138
hGroup: 0x3e2fe8
pwQualities:
[000] 0x00c0 OPC_QUALITY_GOOD
::::
[002] 0x00c0 OPC_QUALITY_GOOD
pErrors:
[000] 0x00000000 S_OK
::::
[002] 0x00000000 S_OK12:08:39.009 – IOPCDataCallback::OnDataChange —————————————————
General:
HRESULT: 0x00000000 S_OK
GroupName: GRP06897320
numCallbacks: 11
minTime: 54.974 ms
averageTime: 132.910 ms
GroupServerHandle: 0x302398
maxTime: 508.228 ms
CallTime: 114.316 msIn Parameters:
hrMasterquality: 0x00000000 S_OK
pvValues:
[000] VT_BOOL -1
[001] VT_BOOL 0
dwCount: 2
hrMastererror: 0x00000000 S_OK
pftTimeStamps:
[000] 2018-10-09T16:08:38.588
[001] 2018-10-09T16:08:38.588
dwTransid: 0
phClientItems:
[000] 0x00000004 [001] 0x00000008
hGroup: 0x0
pwQualities:
[000] 0x00c0 OPC_QUALITY_GOOD
[001] 0x00c0 OPC_QUALITY_GOOD
pErrors:
[000] 0x00000000 S_OK
[001] 0x00000000 S_OK12:08:39.040 – IOPCDataCallback::OnDataChange —————————————————
General:
HRESULT: 0x00000000 S_OK
GroupName: PLC1.Generic
numCallbacks: 12
minTime: 0.139 ms
averageTime: 0.407 ms
GroupServerHandle: 0x5721688
maxTime: 2.238 ms
CallTime: 0.159 msIn Parameters:
hrMasterquality: 0x00000000 S_OK
pvValues:
[000] VT_BOOL -1
[001] VT_BOOL 0
dwCount: 2
hrMastererror: 0x00000000 S_OK
pftTimeStamps:
[000] 2018-10-09T16:08:38.588
[001] 2018-10-09T16:08:38.588
dwTransid: 0
phClientItems:
[000] 0x003d44b8 [001] 0x003d42f8
hGroup: 0x3e2fe8
pwQualities:
[000] 0x00c0 OPC_QUALITY_GOOD
[001] 0x00c0 OPC_QUALITY_GOOD
pErrors:
[000] 0x00000000 S_OK
[001] 0x00000000 S_OK”rapid scada:
“OPC Analyzer Trace – Application Version 1.2.1012
saved on mar 9. oct 12:11:09 201812:10:15.964 – IOPCItemIO::WriteVQT ————————————————————-
General:
HRESULT: 0x00000000 S_OKIn Parameters:
pszItemIDs:
[0] = PLC1.Generic.bandera_ESB
dwCount: 1
pItemVQT:
Item 0:
vDataValue = VT_BOOL -1
bQualitySpecified = FALSE
wQuality = 0x0000 OPC_QUALITY_BAD
bTimeStampSpecified = FALSE
ftTimeStamp = 1601-01-01T00:00:00.000Out Parameters:
ppErrors:
[000] 0x00000000 S_OK”October 10, 2018 at 3:52 pm #4392MikhailModeratorWe can see the difference:
In the 1st example:
IOPCSyncIO::WriteIn the 2nd example:
IOPCItemIO::WriteVQTCan you ask the OPC server developer if they support IOPCItemIO::WriteVQT?
October 11, 2018 at 4:58 pm #4404mariodavidParticipantdeveloper wrote: Hello Mario,
“The issue here is that the WriteVQT is writing a value of -1 (high) and a quality of Bad. Where the Quick Client write is only writing a -1 (high). Your other client needs to not write the quality bad if you want the quality to remain good and the write succeed.
Why is the rapid scada writing a bad quality? OPC Specs declare that the value is undefined if OPC quality is bad, so the server is not processing the write.
Thanks,
Marc”October 11, 2018 at 5:00 pm #4405mariodavidParticipantdeveloper wrote: Hello Mario,
“The issue here is that the WriteVQT is writing a value of -1 (high) and a quality of Bad. Where the Quick Client write is only writing a -1 (high). Your other client needs to not write the quality bad if you want the quality to remain good and the write succeed.
Why is the rapid scada writing a bad quality? OPC Specs declare that the value is undefined if OPC quality is bad, so the server is not processing the write.
Thanks,
Marc”October 11, 2018 at 5:06 pm #4406mariodavidParticipantWill there be any difference if I use the 5.5.3 version? I am using 5.5.2 rapid scada version.
October 11, 2018 at 6:24 pm #4410MikhailModeratorAs I understand, quality is not specified.
Item 0:
vDataValue = VT_BOOL -1
bQualitySpecified = FALSE
wQuality = 0x0000 OPC_QUALITY_BADOctober 11, 2018 at 6:25 pm #4411MikhailModerator5.5.3 version? I am using 5.5.2
The OPC driver was not changed.
October 11, 2018 at 6:31 pm #4413MikhailModeratorPlease ask Marc why he doesn’t take into account the QualitySpecified field?
Mario, I’m interested in solving this issue. Let’s continue the dialog.October 15, 2018 at 5:49 pm #4443mariodavidParticipantHi. The developer does not answer yet. I have been searching and some servers are not compatible with writeVQT method. https://advosol.com/manuals/opcdanet/topic177.html
Is there the possibility of writing with another method?
October 16, 2018 at 3:00 pm #4444MikhailModeratorHi,
Try switch to OPC DA 2 in Communicator and check what write command is used.
I can set Quality in the driver, but before I do it, it’s better to hear an answer from the OPC server developer.
October 17, 2018 at 9:51 pm #4446mariodavidParticipantHello.
I try with 2.XX and and the same thing happens. Marc:
“Hello Mario,
I have been able to install rapid scada and am currently testing this on our system. I am having some trouble issuing a write – how are you doing that exactly on your end?
The reason I do not think this is an issue with the IBH server is that it actually responds with a “success” so I would expect that the write has been processed correctly – this is something I would like to see here on my end.
Kind Regards,
Marc”
Is it possible to write with IOPCSyncIO::Write?
October 19, 2018 at 10:19 am #4451MikhailModeratorIs it possible to write with IOPCSyncIO::Write?
I don’t think that this is possible.
In the source code of KpOpc.dll driver I just use daServer.Write(new Opc.Da.ItemValue[] { itemVal }); and the library made by OPC Foundation choose lo-level method WriteVQT.I can try setting Quality field of the item being written.
-
AuthorPosts
- You must be logged in to reply to this topic.