• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

WildChar in PacketStart and PacketEnd

Started by thorsten, November 07, 2018, 08:43:59 am

Previous topic - Next topic

thorsten

Hello,

i use the Version 9.38 of nrComm.

How can i use the WildChar in the PacketBegin or in the PacketEnd.

I had try this, but this does not work!

  //POLL
    nrDataProcessor1.DataPackets.Items[2].Caption:= 'POLL';
    nrDataProcessor1.DataPackets.Items[2].PacketBegin:= CHAR($10)+CHAR($02)+'*'+CHAR($4E);
    nrDataProcessor1.DataPackets.Items[2].PacketLength:= 8;
    nrDataProcessor1.DataPackets.Items[1].WildChar:='*';
...
   nrcomm1.Active:=true;


We have the same problem with some variable Packets, at the PacketEnd we have $10 + $03 + CheckSumeByte1 + CheckSumeByte2
For the CheckSumeByte1 and CheckSumeByte2 we need the WildChar Function.

Thorsten

Roman Novgorodov

November 07, 2018, 09:11:34 am #1 Last Edit: November 07, 2018, 09:16:12 am by Roman Novgorodov
Hello

I see a small error. Please change this line

    nrDataProcessor1.DataPackets.Items[1].WildChar:='*';

to this:

    nrDataProcessor1.DataPackets.Items[2].WildChar:='*';

If it will not help, please download latest  trial version 9.50 and check with it.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

thorsten

Hello,

yes, this was the problem  :-[

Thank you :-D

thorsten

Hello,

it is strange, from time to time this works with the WildChar and often not.


Roman Novgorodov

Hello

You need to log all incoming data and post here dump of bytes that are detected wrong.
Also you can create a simple demo project and give me sources with sample of incoming data stream.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.