• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
November 23, 2024, 06:51:17 am

News:

SMF - Just Installed!


Dataprocessor Problem

Started by freddygloves, September 19, 2013, 05:03:19 pm

Previous topic - Next topic

freddygloves

Hello,

i made several little testprograms for our electronics by using VCL nrComm.
Now my chef decided to change to C#.

But the dataprocessor dosn't work like in the delphi.
The onpacket event does work. But if I want to read out the content of the received data, it dosn't make sense.


        private void nrDataProcessor1_OnDataPacket(object sender, DeepSoftware.nrCommLib.Protocols.NrDataPacket packet)
        {
           
           
            int i;

            for (i = 0; i < packet.DataLength; i++)
            {
                bDGAnswer[i] = packet.DataOnly[i];
            }
            switch(packet.Tag){
                case 0:
                    this.BeginInvoke(new UpdatertLoggerDelegate(DisplayText), new object[] { bDGAnswer });
                    break;
                default:
                    MessageBox.Show("Error");
                    break;
            }
        }


I made a little test by jumpering Rx and Tx of my Comport to generate an echo on my bus.

I send following data by using this code:

byte[] myDatagramm = new byte[] { 0x31, 0x13, 0x03, 0x01, 0x00, 0xB4, 0xC5, 0x07 };
...
nrComm1.BeginWrite(myDatagramm, 0, myDatagramm.Length);
Application.DoEvents();
System.Threading.Thread.Sleep(20);


the answer which should be the same (because of my jumper) looks like this:
0xC5 0xC5 0xC5 0xC5 0xC5 0xC5 0x7 0x7

I can only see the last to byte for several times...

Can you help me, there is no example for the dataprocessor...

Roman Novgorodov

Hello

We have checked the sending of your test byte sequence.
All works fine and all 8 bytes are received.

Possible something wrong with NrDataPacket packet properties.

Please create  a simple demo C# project and upload sources here.
We will check all.

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.

freddygloves

September 20, 2013, 06:05:01 pm #2 Last Edit: September 20, 2013, 06:09:00 pm by freddygloves
Hello Roman,

thank you for your quick reply. In the attachment you can find my example project for the dataprocessor.

The second attachment is a screenshot, which shows the incoming data via my jumper between TxD and RxD.

I don't know what I'm doing wrong. Maybe you can help me...

Roman Novgorodov

Hello

Thank you for information.

I have tested your sources with our version of nrComm NET.
Please see result on screenshot from attachment.

It seems like with latest version of library all works correctly.
We are planning to release new nrComm NET at the next week.

Whilst You can try rc version of nrComm.Core in attachment.

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.

freddygloves

Hello Roman,

Thank you for the prerelease of nrComm.Core.

I can only say much better !!!
The packet.DataLength recognition works now, too. There was a problem if you set the property datalength to "0".
It always stays zero, which is not good, if the length of the incoming data is variable or unkown.

You will release the new version next week for sure? It's very important for me to have a working version of nrComm NET.  Our purchase department bought a Team-License via "CCP Software GmbH Germany". Until now I'm the only developer, who works with nrComm NET, but I told my chef that it will work like VCL nrComm 100%.
So I'll tell the other three developers that they should wait with the installation till new version is official.

If anybody else will test my testsource you'll have to pay attention. Becaus my nrComm.Core was referenced to the assembly, which was registered into the GAC via installation.

If you replace the old nrComm.Core with the new nrComm.Core you have to change the reference of the project too.
And you have to update your MS VS toolbox with the new version, if you want to use the toolbar to drag and drop nrComm tools.


Another question about registration
At my firm I've a registrated version of nrComm NET. After downloading the new version, can I install it normally ? Have I to remove the old version and register the new version via the license-File again ?

Because it's is a little bit complicated to register your product at our firm. Because our firewall and proxy blocks the activation. So I have to take my notebook away at home and login into my wlan (internet access), which not blocks the activation.
Our IT deparment asked for more information (activation-url and port) so they can adjust the firewall and proxy settings.
Do your activation tool uses the proxy settings of Internet Explorer ? This was a question of an IT deparment colleauge.
Maybe you can help us...
My three colleagues don't have notebooks they have desktop pcs, so they can't carry this pcs so much easily at home as me  ;)
I made a screenshot at my firm, while having the problem (see attachment)

freddygloves

Another question about the nag-screen:

When I compile my project on my registrated notebook, there is no nag screen.

When I give the executable file to another person for example our quality mananger, who only should use my coded software, the nag screen appears again.

The nrcomm VCL don't have this behaviour.
The nag screen is not shown in compiled executable files.

Is this new behaviour desired by DeepSoftware ?
I can't believe that every user of my finished software have to buy your license to use it without the nag-screen.

Greets from Germany
freddygloves

Roman Novgorodov

Hello

Thank you for information.

Job is in progress. We are testing licensing system of nrComm NET now.
I hope we will resolve all issues before release on this week.

Thank you for patience.

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.