JAVA JNI Channels (channel id) missing when reading data
JAVA JNI Channels (channel id) missing when reading data
Hi,
thanks to you, I got my java program connected to the PCAN FD system yesterday and thanks to your netbeans program provided I could overcome the TPCANStatus.PCAN_ERROR_QRCVEMPTY message I got after some time always.
And learned I can read meassages two wasy: myself or event driven by JNI interface if receive-events are detected.
But reading data with a while(true) loop or event driven, channels are missing.
Situation:
===========
- It's a PCAN-MicroMod-FD connected to PCAN-PCI Express FD.
- 4 channels are programmed with one ad-converter each. PCAN-View works fine, see fig1 attached.
In my java programm, I am receiving one channel only (id=300h). I assumed first, it's my fault, but checking the connection with the netbeans application you have provided (fig2), it's the same.
Therefore, I assume, the problem must be somewhere else, maybe it's the window version (actual Win10) or the java (java 17) or something else, hopefully you can help. The goal of the software shall be to collect all data incoming like in the .trc-files written by PCAN-View when connected.
best regards - Philipp
thanks to you, I got my java program connected to the PCAN FD system yesterday and thanks to your netbeans program provided I could overcome the TPCANStatus.PCAN_ERROR_QRCVEMPTY message I got after some time always.
And learned I can read meassages two wasy: myself or event driven by JNI interface if receive-events are detected.
But reading data with a while(true) loop or event driven, channels are missing.
Situation:
===========
- It's a PCAN-MicroMod-FD connected to PCAN-PCI Express FD.
- 4 channels are programmed with one ad-converter each. PCAN-View works fine, see fig1 attached.
In my java programm, I am receiving one channel only (id=300h). I assumed first, it's my fault, but checking the connection with the netbeans application you have provided (fig2), it's the same.
Therefore, I assume, the problem must be somewhere else, maybe it's the window version (actual Win10) or the java (java 17) or something else, hopefully you can help. The goal of the software shall be to collect all data incoming like in the .trc-files written by PCAN-View when connected.
best regards - Philipp
- Attachments
-
- 3 channels are missing
- bild2.jpg (419.94 KiB) Viewed 5447 times
-
- all 4 channels are read correctly
- bild1.jpg (155.16 KiB) Viewed 5447 times
Re: JAVA JNI Channels (channel id) missing when reading data
By the way, what is better:
while(true) loop to read data
or
event driven by JNI interface if receive-events are detected?
do you suggest one method?
best wishes Philipp
while(true) loop to read data
or
event driven by JNI interface if receive-events are detected?
do you suggest one method?
best wishes Philipp
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: JAVA JNI Channels (channel id) missing when reading data
Event driven is always better - you also do not read directly the CAN Hardware, you read the queue from the driver that was created for your application.
We do not see your problem receiving only one single CAN-ID (it is no "channel" it is a CAN-ID ) i just try it here - works without any problem...
Please try the binary sample (exe) that comes with the package (could be found in the x86/x64 folder) - do you see the same "problem"
We do not see your problem receiving only one single CAN-ID (it is no "channel" it is a CAN-ID ) i just try it here - works without any problem...
Please try the binary sample (exe) that comes with the package (could be found in the x86/x64 folder) - do you see the same "problem"
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: JAVA JNI Channels (channel id) missing when reading data
PCANBasicExample.exe gets all 4 can-id.
maybe i should try another java version? I have not changed your netbeans java application, just compiled and run.
maybe i should try another java version? I have not changed your netbeans java application, just compiled and run.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: JAVA JNI Channels (channel id) missing when reading data
OK - we will check it and come back soon with a solution...PCANBasicExample.exe gets all 4 can-id.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: JAVA JNI Channels (channel id) missing when reading data
thank you! I'm in vacation until 1.11.
Re: JAVA JNI Channels (channel id) missing when reading data
hello,
have you found a solution already?
best regards - Philipp
have you found a solution already?
best regards - Philipp
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: JAVA JNI Channels (channel id) missing when reading data
please send a short e-mail to support[at]peak-system.com - we will send you a secure link with a pre-release version.
Before we make a release version we have to do many other QC test up in front...so there is no public link available at the moment.
Before we make a release version we have to do many other QC test up in front...so there is no public link available at the moment.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: JAVA JNI Channels (channel id) missing when reading data
Hi,
replaced the ddls and used the java test application (NetBeans project) you have send and its working now, all 4 channels are read now! many thanks!
I also checked my own application, which still uses the old java peak.can.basic package and its working too. the significant change must be within the dlls
best regards - Philipp
replaced the ddls and used the java test application (NetBeans project) you have send and its working now, all 4 channels are read now! many thanks!
I also checked my own application, which still uses the old java peak.can.basic package and its working too. the significant change must be within the dlls
best regards - Philipp
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: JAVA JNI Channels (channel id) missing when reading data
Thank you for the feedback - we will processing with creating a release candidate and update our files soon.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------