Posts by fs-support_HK

    Quote from "tsuji"

    1.Tell me maximum EventQueueSize.


    There is no restriction, only the size of the memory.


    About the frame format:


    There are a few examples about different frame formats and acceptance filters in the WinCE-CAN docu on pages 19 to 29. If this is not sufficient, you can download the full data sheet of the SJA1000 CAN chip used on our boards. This should explain how these special cases are handled.


    Best regards,


    H. Keller

    If ndcucfg is started, this shows that the files of registry key "init" are in fact executed. Therefore I see no reason why your application should not be started, too.


    I assume that you have not given all required depend entries for your software. For example if your software uses graphic features (as most of the programs do), you have to give a depend entry for gwes. Maybe your application starts quicker when doing a reboot than when doing a cold start, and then gwes is not yet up and running and your first attempt to use graphic features (like creating your application window) will fail and your application crashes and stops execution. This looks like as if your application was not started at all. But in fact it was started, but failed.


    Try this: give your application the highest number of all launched programs. Give it a depend entry for all other (earlier) programs in init. Then try again. I bet that your application will start correctly now, even on reboot.


    Regards,


    H. Keller

    Here's a little bit more information about this last point. When using our update tool, you just insert a specially prepared USB memory stick (or SD-card where available) into the NetDCU and then the system automatically copies the files from the memory stick to the board. That's all you have to do to install the software. I would say this is perfectly suited for production.


    As the name suggests, this tool is also useful when doing updates in the field. In this case the system also creates backups of the old software. So if something goes wrong during the update process, the old files are restored and the previous version can be used again, like before the update attempt. This is so easy that you can even send the memory stick by mail and let some user do the update. It is not necessary to bring some service technician to the site where the device is located.


    Regards,


    H. Keller

    Quote from "all-finder"
    Code
    1. UInt32[] tmpA = new UInt32[i];
    2. rvalue = DeviceIoControlProperties(hPort, CANElements.IOCTL_CAN_READ_PROPERTIES, 0, 0, out tmpA, Marshal.SizeOf(tmpA), out ReturnedBytes, IntPtr.Zero);


    war bis 1024 nicht erfolgreich


    Vermutlich weil Sie einen Denkfehler machen. Ein .NET-Array hat solange die Länge Null, bis Werte eingetragen werden. So haben Sie trotz unterschiedlich deklariertem Array dennoch mit Marshal.SizeOf(tmpA) immer den gleichen Längenwert an die Funktion übergeben, nämlich 0. Lassen Sie sich diesen Wert doch mal vor dem Aufruf ausgeben, und Sie werden sehen, dass sie eben *nicht* Werte bis 1024 durchprobiert haben.


    Der interne Code ist leider so geschrieben, dass die Anzahl genau passen muss. Das Array darf also auch zu groß sein.


    Dass ich Ihnen hier nicht einfach eine Zahl nenne, liegt daran, dass es nicht ganz leicht ist, diese Zahl zu ermitteln, da Sie auch in meinem Code relativ kompliziert berechnet wird. Da tauchen die Längen von Feldern und Enumerations auf, die Längen von Teilarrays werden dann aufsummiert, usw. Das alles ist nicht ganz so leicht nachzuvollziehen und zusammenzusuchen. Da erscheint es mir einfacher, dass Sie schnell eine Schleife programmieren und es kurz ausprobieren.


    Mit freundlichen Grüßen,


    H. Keller

    Das ist doch einfach rauszukriegen: einfach so lange mit verschieden langen Arrays aufrufen, bis kein Fehler mehr zurückgegeben wird.


    Aber ich muss nochmal fragen, warum Sie die Klasse nicht einfach kaufen. Sie machen nun schon wochenlang daran herum, finanziell hat sich das für Sie garantiert nicht rentiert. Die momentane Klasse bekommen Sie doch sogar im Quelltext, d.h. das Verständnis wäre gegeben. Und anpassen müssen Sie die Klasse eigentlich nicht. Sie müssen ja auch nicht den Ethernet-Treiber anpassen, wenn Sie eine Ethernet-Applikation schreiben wollen. Nein, Sie müssen einfach eine Applikation schreiben, die diese Klasse verwendet. Und wenn Ihnen die Klasse so noch nicht gefällt, dann leiten Sie die Klasse ab und erzeugen eine eigene, genehmere Klasse.


    Mit freundlichen Grüßen,


    H. Keller

    Man muss schon ein bisschen auf die Produktnamen achten um Verwirrung zu vermeiden, auch für uns bei den Antworten. Sie verwenden eine NetDCU6. Den Registry-Key mit "Samsung" gibt es aber bei der NetDCU8. Auch ist dies ein Forum zur NetDCU8 (wobei Ihr Posting in diesem Bereich mangels eines speziellen Unterforums für die NetDCU6 verständlich ist). Das Board nur mit "DCU" zu bezeichnen ist ebenfalls verwirrend, weil es bei uns eine ganz eigene Produktreihe mit diesem Namen gibt. Beispielsweise ist die DCUL8 etwas komplett anderes als die NetDCU8!!!


    Mit freundlichen Grüßen,


    H. Keller

    Just to be curious: when the example at the beginning of this thread is run, it displays no less than five (!) different names:


    For each store (taken from struct STOREINFO):


    1. The DeviceName
    2. The StoreName


    For each partition on the store (taken from struct PARTINFO)


    3. The PartitionName
    4. The FilesysName
    5. The VolumeName


    Do you say that none of them is the name of the USB memory stick as seen in the explorer on a standard Windows Desktop system? Then I must say I'm really out of ideas.


    Regards,


    H. Keller

    Currently it is only a set of two Win32 drivers. One for the Native-I2C (if available on the board) and one for simulating I2C over GPIOs. There is no C# class available. We can write such a class for you if you want. Please ask our sales department for the conditions.


    Regards,


    H. Keller

    Sehe ich das richtig? Sie haben einen WinCE5.0-Kernel inkl. Treiber für die NetDCU8 und wollen diesen 1:1 auf der NetDCU10 laufen lassen? Das wird nicht funktionieren. Auch wenn der Prozessorkern im wesentlichen der gleiche geblieben ist, die Peripherie ist teilweise auf andere I/O-Ports gewandert, manche Bauteile haben sich komplett geändert, neue Bauteile sind hinzugekommen. Somit müssen auf jeden Fall die Treiber angepasst werden.


    BTW ist es genau das, was wir mit Erscheinen eines neuen Boards jedesmal machen müssen und was selbst bei uns, wo wir die Hardware ja nun wirklich genau kennen, mehrere Monate dauert. Es wäre so schön, wenn man nur einfach den Kernel des alten Boards nehmen müsste...


    Mit freundlichen Grüßen,


    H. Keller

    The 5V setting is a little bit confusing, not to say unnecessary. The difference is that the pull-up resistors are pulling to 3.3 or to 5 V. But the diver chips remain 3.3V with 5V tolerant inputs. What does this mean in 5V mode?


    1. A signal, that is actively driven low by the NetDCU is 0V.
    2. A signal, that is actively driven high by the NetDCU is 3.3V.
    3. A signal, that is not actively driven by the NetDCU is pulled high to 5V.
    4. Any high signal driven by the periphery is accepted as 3.3V or 5V.


    Regards,


    H. Keller

    Do I understand this correct that you create a new CanPort object for every message you want to write? This is wrong. The idea is to create *one* CanPort object and use it through the whole existence of the application.


    You have to understand how .NET and garbage collection works. When you don't use an object anymore, like pCAN after leaving function WriteMessages(), the object is not destroyed immediately. It still exists further on until the next run of the garbage collector. Therefore every new pCAN object you create exists in parallel with all the old pCAN objects. And as each object opens another file handle, it may be that WinCE is running out of device file handles after 254 open device files.


    Regards,


    H. Keller

    I think the user device name is stored as a file name in the root directory of the device, usually with some special attributes appended, marking this entry as device volume. You may find this name by searching the root directory with FindFirstFileEx() giving the appropriate attributes.


    Regards,


    H. Keller

    Quote from "Mirko"

    für DeviceIoControl() habe ich den Importkode.


    Das bezweifele ich, denn "den" Code dafür gibt es nicht. Je nach Funktion sind hier andere Parameter notwendig, weshalb so eine Funktion in VB üblicherweise mehrfach definiert, also überladen ist.


    Quote

    Weitere Frage ist, wo gebe ich meine Interruptroutine an? Ich schätze in WaitForSingleObject(Meine_Interruptroutine, Zeit), oder?


    Nein. Das Konzept läuft anders. Man erzeugt einen Event mit CreateEvent() und assoziiert dann den Event mit dem Interrupt über InterruptInitialize(). Künftig wird also jedesmal, wenn der Interrupt auftritt, der Event gesetzt. Auf dieses Ereignis kann mit WaitForSingleObject() gewartet werden. Üblicherweise wird dieser Aufruf und die daran folgende Behandlung deshalb in einen eigenen Thread ausgelagert. Man spricht darum auch vom Interrupt Service Thread (IST).


    Da Interruptbehandlung üblicherweise zeitkritisch ist, sollten Sie sich dringend überlegen, zumindest dieses Modul in C/C++ (Win32) zu implementieren und nicht in einer .NET-Sprache.


    Mit freundlichen Grüßen,


    H. Keller

    Quote from "manfred"

    Bei einem einfachen Schreibzugriff bleibt Datenbit 1 auf dem Wert, auf den man es gesetzt hat. Alle anderen Bits zeigen nur einen kleinen Nadelimpuls und gehen dann wieder auf HIGH-Potential.


    Auf der NetDCU-Seite werden die Daten nur für die Dauer des Zugriffs auf den Bus gelegt, also nur wenige Nanosekunden lang. Das ist der Nadelimpuls, den Sie sehen. Danach ist der Bus wieder hochohmig und die Signale werden über Pull-up-Widerstände auf High-Potenzial gezogen. Wenn hier ein Bit nicht auf High geht, dann ist der Pull-up kaputt.


    Wenn Sie diese Werte dauerhaft behalten wollen, dann müssen Sie sie auf Ihrer Seite in einem Latch merken.


    Mit freundlichen Grüßen,


    H. Keller

    The problem is not the pointer itself, it is the layout of the data structures that differs from C#.NET to C.Win32. Pointers can always be generated by using ref or out function arguments. But bringing the structures into correct order is more difficult.


    Regards,


    H. Keller

    Well, what method do you expect?


    1. If the application supports reordering of the icons and buttons then it might run on a smaller resolution. This depends on the application itself.


    2. Automatic downscaling of the window from 800x600 to 640x480 (like rescaling a video) is not possible with the NetDCU8 hardware.


    3. A virtual desktop with 800x600 pixels where you can choose to view a sliding section of 640x480 pixels from would be theoretically possible, but to my knowledge is not implemented in the current display driver. Anybody correct me if I'm wrong.


    Therefore I would say most probably it is not possible, unless supported by the application itself.


    Regards,


    H. Keller

    You can try to reduce the values of BFW/EFW (begin/end of frame wait) or BLW/ELW (begin/end of line wait) a little bit. For example install a new mode with the same settings as mode 0 and change one of the values and try again.


    I recommend only to change one value at a time and only in small steps or maybe you won't see a picture on the screen at all anymore.


    Best regards,


    H. Keller