Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI6527 Change detection in Java works!!!

It works!!!

Just love these moments. Especially when they are two hours before my
holiday starts.

What?
Change detection in Java, with a PCI6527 card. All they way up into my
application

Our lessons learned:

- The change detection interval starts at 20us, if you don't use a filter.
We need about 200us, so that's well within limits. Too bad figure 4-2 in

the 6527 user manual suggests an accuracy of at least 100ns.

- There is no room to add custom hardware components in a SCB100, on data

lines 25 to 50. This means that if you want to monitor more than 12 signals,

each using custom hardware (for example, a zener to configure the voltage

level at which a change detection is to be sent), the SCB100 accessoiry will

give you a challenge you'd rather not havet.

- In the call to DIG_Change_Message_Config, the callbackAddr is an u32.
This requires an (ugly) cast from a void* to a u32. It's ugly, but it
works correctly.

- When change detection is running while you close the application, if
you get a callback somewhere during this exit, Windows NT 4.0 gives you
a nice blue screen. Solution: stop change detection before you exit your
application.

- The interface with java works perfectly, using JNI on top of NI-Daq.
The callback-side writes its data into a buffer, wakes up a thread from
the java environment and returns from the callback method.
The thread from the java environment makes a JNI callback, which results
in an event sent to registered listeners.

The buffer flows over if we generate callbacks continuously at a rate of

faster than once every 5ms. This does not occur in our situation (only
if we start playing with a function generator, but that's not the regular
kind
of usage).


Conclusions:
- An expensive 6533 card or other card with an onboard processor is not
always neccessary. Change detection works even for relatively short
pulses (for safety, say 100us).
- Java on top of Ni-Daq works great! You're definitely not restricted to

LabView or C. Just keep ignoring NI people trying to convince you to
use Labview, because C is an ugly language, and you will end up with
a great program.
- (one week later) never expect the proxy to work if you're about to take
a
holiday...
Message 1 of 3
(3,412 Views)
Wow, I'm glad to see there's at least one other person on the planet using NI hardware and not using LabView! Even if you are using a different language than me (MSVC C++) 🙂

You actually got a BSoD? Did you have a checked build installed? We usually just get reboots or hard-lock-ups when NI-DAQ isn't gracefully shutdown. (The worst is when you're debugging and you hit 'program reset' - Doh!)

Did you write any hardware abstraction interfaces for NI-DAQ?
0 Kudos
Message 2 of 3
(3,412 Views)
Hello,
I just see the message.

I exact need to be notified in my java software the a change occurs in the PCI6527 card.
In fact there is one or two cards in the final equipment.

Can you tell me where I can find the software (JNI DLL ?) and how to use it ?

Many thanks for your help, this is exaclty what I need


Have a nice day

Thierry Vorms
Skyguide / Geneva
0 Kudos
Message 3 of 3
(3,050 Views)