09-01-2014 07:37 AM - edited 09-01-2014 07:37 AM
Hi,
I am looking for some example what meaning have "channels" in IviCounter class in the parameter of functions.
It seems IviCounter class API only expect the instrument to have one counter channel (consisting of source, gate, arm)
because inititate(), fetch() and read() functions do not have "channel" parameter, so it cannot be specified on which channel to measure.
In that case, 'channels' would map to gate, source, arm terminals ?
It is not clear to me why would API functions have the channel parameter but only allow user to read measurement for just one 'active' channel
using the read function.
Can anybody advice more comphrensive example tha what's in Labwindows CVI ?
(Basically I am creating IVI specific driver that maps IviCounter class to DAQmx calls for PXI-6612 counter.)
Thank you,
Radek Pozdnicek
Honeywell Aerospace
Brno Czech Republic
09-04-2014 02:42 AM
Hi Radek,
IviCounter class API is designed based on IviCounter Class Specification.
I guess the reason why initiate(), fetch() and read() functions do not have "channel" parameter is that the measurements on the channels do not occur simutaneously.
I think you are right, the read() function reads the measurement result of the 'active' channel. So if you use class API to configure channel 1, then use read(), you'll get the measurement result on channel 1. Similarly, if you use class API to configure channel 2, then use read(), you'll get the result on channel 2.
Hope it helps.
Hailin
09-04-2014 05:53 AM
Thank you for your reply,
I was also trying to find some examples on web, but all of them were too simple.
These type of measurements:
IviCounter_ConfigureFrequencyRatio
IviCounter_ConfigurePhase
IviCounter_ConfigureTimeInterval
need 2 channels that not all IviCounters (agilent for. ex) have,
not sure how can they be compliant to class specification.
In case of NI PXI-6612 8 channel counter I am going to split it to 4 logical names/instruments,
2 counters each to support these measurements.
Thank you,
Radek
09-04-2014 09:04 PM
In your case, you can keep the signature of these functions as class specification defines. In the function body, just do not use the unsupported channel parameter.