05-16-2024 06:58 PM
I have a Micro-Epsilon confocal sensor IFC2421 that I'm working with. I'm working on some software in C++, and I'm using their MEDAQLib to communicate with the sensor. The user manual for this sensor says it's able to calculate averages of values in the sensor, and I'm looking for a way to request that from C++. In their programming library documentation, MEDAQLib.pdf, I'm a little confused about how to do that, or if it's even possible from C++. You can set the averaging type with SP_AveragingType and set the sample count with a command such as SP_MovingCount. Then, it looks like there's the command Get_AverageValue, which you can use to get the average value - However, it comes as an int (not a double, as their scaled values are in). Also, I imagine you'd need to wait for the correct number of samples for it to return a value. I've tried that, but I'm getting 0.
Has anyone done this? I've implemented sample averaging and other statistical calculations in our software due to the confusion over how to have the sensor do it from C++.
05-16-2024 07:43 PM
This is a NI forum, specifically for NI industrial comm products like NI-EtherCAT, NI-Ethernet/IP etc.
Are you using any NI hardware or software?