number of channels evil

I have a fieldpoint configuration to query all channels on a DO401. This is how I can get feedback on the status of all channels.

However, when I read the output, he returned 32 instead of 16 values.

This could be the cause? I have a workaround to make the first half of the table

Open the FP Subvi reading and you'll see why.

At the heart of the Sub - VI is a call to the dll that returns a Double for values in floating point.  It gets converted to an integer U32, which is then converted to an array of Boolean.  So you end up with an array of Boolean 32, even if your I/o module is that many inputs/outputs.

The other thing to consider is that there are some 32 there input modules and the same Subvi should be able to handle.  For some reason the Subvi do not try to understand how many inputs/outputs, there might be in the module to truncate the table to have only as many elements.

Tags: NI Hardware

Similar Questions

  • Number of channels of "scan list" to decode

    Is it possible to decode the number of channels in a scan list?  The example of NOR (niSwitch Thermocouple Measurements.vi) that I use, requires the entry of "scan list" and "number of channels.

    Hello Ddemara,

    If you're multiplexing through a bunch of thermocouple, the scan list will be not complex, then we could easily write code to determine the number of channels.  Our code will have to do the following:

    (1) start a counter with the value 0.

    (2) Iterate through scan list user-defined and add 1 to the counter whenever you find a comma.  The last element will not have a comma, so we will need to add 1 to the value at the end.

    (3) find each instance of a colon (":"), then find the two numbers on each side of the colon, subtract these two numbers and then add them to the value of the counter.  We don't need to add one to the value of end here because we have already included the first item in the series

    (4) the value of the counter is at this point the number of channels in the scan list.

    If you have any questions to set this up, after. Have a great day!

    FYI: The number of lanes in the example you mentioned allows us to recover data from the DMM as the first element of the array is always the thermocouple.  If the number of channels is wrong, extract indexing element 0 will cause plug wrong value to the CJC for thermocouple input scaling of vi.

  • Query the number of channels on all devices

    I would like to know the total number of channels WAS supported by all the devices I plugged into my computer. The snippet of code below works, but it requires me to specify the device with a constant, or a control. When I go to create this constant/control, LabVIEW knows already what is plugged in-how can I access this information?

    The only devices will be a NI 9234 or 9233 in a cDAQ chassis or the sleeve of USB.

    False alarm... Here is the solution, I came with.

  • How to display a certain number of channels...

    Normal
    0

    fake
    fake
    fake

    MicrosoftInternetExplorer4

    / * Style definitions * /.
    table. MsoNormalTable
    {mso-style-name: "Table Normal";}
    MSO-knew-rowband-size: 0;
    MSO-knew-colband-size: 0;
    MSO-style - noshow:yes;
    "mso-style-parent:" ";" "
    MSO-padding-alt: 0 to 5.4pt 0 to 5.4pt;
    MSO-para-margin: 0;
    MSO-para-margin-bottom: .0001pt;
    MSO-pagination: widow-orphan;
    do-size: 10.0pt;
    do-family: "Times New Roman";
    MSO-ansi-language: #0400;
    mso-fareast-language: #0400;
    mso-bidi-language: #0400 ;}

    Hello!

    I'm using LabVIEW 8.5 and I'm trying to display a specific number of channels using several channels...
    I can show in a chart, but I display the 16 analog inputs
    that have NEITHER 6024E and I need to view only the channels that have something
    connected to them (I do not know which channel will have something connected to)
    It). If they have a signal (temperature), I want to show only channel/s in a graph and save this channel/s in a txt file. If it isn't
    I don't want to view or save the channel/s.

    How can I do this with DQA Assistance?

    I am able to do all of this using a single channel, I can view in
    a graph, I can save it as a txt file, but I'm not able to do it for the number n
    only active channels. All advice or suggestion will be appreciated.

    Sincerely,

    Julieta.

    The "AI Multi Pt" looks like an old traditional DAQ example. The DAQ Assistant use DAQmx and it hides a lot of code. It's good and bad. Good if you do not need to change anything. Bad if you do. I don't know how you have configured the task, but you can do what you want by simply using the DAQmx screw directly. There are many examples provided with LabVIEW. Open example Finder (help-> find examples) and navigate to hardware input and output-> DAQmx-> analog measurement. I don't know if you need to go into the directory of the temperature or voltage, because as I said, I don't know how your task is implemented.

    Let's take a simple example. If you open the "Acq thermistor samples-SW Timed" in the directory of the temperature you can see it's pretty simple. The first VI is the DAQmx create channel VI. It has a "physical channel" entry. This can be a DAQmx control or it can be a string when you specify the list of channels to collect. So, to do what you want, you just have to create the string corresponding to the channels you want to collect. LabVIEW help describes how to create this string. The other method is to use the technique of this watch aestat. However, what is shown is only a part of what you need to do. You must have a pre-created range of channels and then you select the ones you want.

    See attached example (LV 8.2) to get an idea.

  • generic calculations with changing the number of channels

    Hello

    I want to do some math basic with a flexible number of channels. The point is that I get an error if I specify strings that do not exist in my calculations. For example:

    CCh("[1]/CNV",2)-CCh("[2]/CNV",2) + CCh("[3]/CNV",2)-...

    I think that it should be possible to do this using a script, but you have no idea how to do it only with the calculator?

    Thanks in advance

    Jeremy

    You can do this easily using the recoding for VBScript method described in the following KB:

    http://digital.NI.com/public.nsf/allkb/B769AE10EDB656D28625692D00583166?OpenDocument

  • HAVE sampling frequency is divided by the number of channels + 1 for simulated ENET-9213, WLS-9213 and USB-9213

    Hello

    In the code in the example attached, I create a task with a single channel of AI.

    I get the maximum sampling frequency using DAQmxGetDevAIMaxSingleChanRate (or DAQmxGetDevAIMaxMultiChanRate), both return the same value of 1351 s/s.

    When I try to configure the sample calendar using DAQmxCfgSampClkTiming at the maximum sampling frequency clock he does not accept the rate and returns the following error. Note that the error message shows 2 channels, even if only a channel has been added.

    OUTPUT:
    DAQmx error:
    Sampling frequency is greater than the maximum sampling frequency for the number of specified channels.
    Reduce the sampling frequency or the number of channels. The increase in the conversion rate or
    reduce the time of the sample can also mitigate the problem, if you define one of them.
    Number of channels: 2
    Sampling rate: 1.351351e3
    Maximum sampling frequency: 675.675676

    Why the device driver thinks I have 2 channels in the task, when a channel has been added?

    Please find the code to reproduce this problem attached.

    Kind regards

    whemdan

    The MathWorks

    Hello w,

    By default, the ENET/WLS/USB-9213 in NOR-DAQmx module has the AI. AutoZeroMode the value of the DAQmx_Val_EverySample property. This causes NOR-DAQmx acquire the channel of the internal path of the unit (_aignd_vs_aignd) on each sample to return more specific measures, even if the operating temperature of the device moves over time. If you need the sampling frequencies higher than this allows, you can call DAQmxSetAIAutoZeroMode(..., DAQmx_Val_Once) (who acquires the formatting string when you start the task) or DAQmxSetAIAutoZeroMode(..., DAQmx_Val_None) (which disables the setting entirely).

    Note that for measures by thermocouple with cold junction compensation sensor of the 9213 NOR, NOR-DAQmx acquires channel built-in CJC (_cjtemp) on each sample as well, for the same reason.

    Brad

  • Why do write can not be performed because the number of data channels does not match number of channels in the task.

    Possible reasons:

    Scripture cannot be performed because the number of data channels does not match number of channels in the task.

    When writing, provide data for all channels in the task. You can also change the task so that it contains the same number of channels as the written data.

    Number of job channels: 8
    Number of data channels: 1

    Lama says:

    The DAQmx vi writing gives me the error. If I run a single channel, isn't a problem. Multichannel gives me error.

    You are funny! Why tie yourself to work VI (single channel) instead of one that gives you errors (multichannel)?

    (If your car does not work, you bring car your wives to the mechanic, right!)

    What is the exact text in the multichannel 'physical channels' when you do the AO control?

    Lama says:

    I did a sequence to ensure that each function has been run in the correct order. Wouldn't a race condition.

    All you have to do is wire the 'start of task' error at the entrance of error of the DAQ assistant and then back to 'stop task' and things will run in order. Guaranteed! Think the stream! Everything else can run in parallel or the order is irrelevant.

    First convert the sequence stacked to a sequence of plate, remove the flat sequence and add the mentioned son. Now, do a "cleaning pattern.

    A when stacked with the inhabitants of the sequence is one of the worst construction you can possibly do. It makes the code difficult to follow, impossible to maintain, difficult to debug.

  • Determine the number of channels selected for traditional DAQ

    The blocks 'DAQmx task' and "Traditional DAQ Channel" look pretty similar (see attachments). The DAQmx block ist an individual selection of channels and I am able to determine the number of selected channels.

    Now I am trying to determine the number of selected channels to a traditional DAQ, but the property DAQmx block does not work here. I already tried the trad to some form of blocks. Range of data acquisition, but failed.

    Any idea?

    In traditional DAQ, there are several ways of specifying the list of channels. Assuming that your picture shows how you use your channel list is just a string of delimited by commas. Wire a constant to a string array node worksheet and specify "comma" as the separator and the number of columns must tell you the number of channels.

    Ben

  • How to detect the number of channels on an oscilloscope?

    I have various models sitting around the laboratory, some two-channel, a few four-channel oscilloscope.  I would like for my program to be able to detect the number of channels is available.

    I can just tell my program how much string is available based on the model number, but is there a VISA command to request scope directly what channels he has?  I would also be able to ask what, if any, ability to function math there.

    "all drivers of the oscilloscope must return the instrumentID after initialization, and that should be enough to know the number of channels.

    What Albert was referring to is that all compatible drivers IVI in their base class interface have an attribute/property that indicates how many channels has the scope.

    If you don't want to use the driver of the IVI for the scope then maybe download some of the drivers and check the source code to see how they calculate this dynamic repeated capablity.

  • writing cannot be porformed, because data channels number does not match the number of channels in the task

    Hello

    I'm writing analogues of the buffer to several channels using NOR-6723.

    For some reason any, whenever I go to the buffer double function (1-d) that contains buffers for all channels.

    I always find myself with exception indicating that the numbers of channels in the data are '1 '.

    I use c#:

    Task m_TaskHandle = new Task();
    
    string sChannelsList = "Dev2/ao21:23";
    
    m_TaskHandle.AOChannels.CreateVoltageChannel(
    
    sChannelsList,
    
    "", 0, 5, AOVoltageUnits.Volts );
    
    int iNumberOfSamples = 4;
    
    double dSamplingFrequency = 1000;
    
    m_TaskHandle.Timing.ConfigureSampleClock("",
    
    dSamplingFrequency,
    
    SampleClockActiveEdge.Rising,
    
    SampleQuantityMode.ContinuousSamples,
    
    iNumberOfSamples /* Only relevant if mode is FiniteSamples */);
    
    // Data code is heredouble[] adSampleBuffer;// array values removed from this code snippet (here i have function that generates data)// array size is: num_of_samples * total_channels (in this case 4 * 3)
    
    AnalogSingleChannelWriter ChanWriter = new AnalogSingleChannelWriter(m_TaskHandle.Stream);
    
    ChanWriter.WriteMultiSample(false, adSampleBuffer);
    
    m_TaskHandle.Start();
    

    Not sure I'm I missing, how the MSTDIO determines the "number of data channels", I receive as an exception, it is always equal to 1.

    would appricate to help.

    Thank you.

    Hi idanbis,

    As the snippet you posted, you can create more than one channel using the ao21:23 range. That said, you should use AnalogMultiChannelWriter to configure your write instead of AnalogSingleChannelWriter operation.

    To write using AnalogMultiChannelWriter::WriteMultiSample (boolean, double, you must know the data you want to write must be stored in a 2D array.) Each element in the first dimension of the array corresponds to a channel in the task, while each item in the second dimension, to a sample of write on its channel. For example, that:

    Double [,] data = new double [numChannels, numSamplesPerChannel];

    Then:

    data [0, 0... numSamplesPerChannel]; It is the set of all samples in the first string (ao21 in your code).

    I hope that was helpful. Let me know if I left any doubt remaining.

    Best regards

    Anzurio

  • Number of channels high: multiple markets good Renault vs expensive DAQ unique?

    I need 4 analog outputs but the resolution is not critical, the USB-6008 low-cost housing will suffice. Is there a reason to buy a more expensive DAQ (like the USB-6351) with many channels against multiple cheap 6008?

    Appears to be a bad practice, but I don't see why...

    I did the systems in two ways.

    Pros to DAQ more expensive: the single connection, only device to implement to the MAX and like johnsold said, usually get you better resolution, precision and timing out of it.  On the other hand, of course, cost... but also the physical size.

    With several small Renault, in the production of benchtop equipment, this means more USB ports on the side, or the use of a USB hub.  More ports means more cables and anything else for the manufacture of screws with.  USB hubs may cause problems on some computers, and usually the first thing I get when troubleshooting.

    Backwards, you save a lot of $ buy two or three 6008 150/ea vs a bigger 6343 to 1500/ea.

    If you use a USB hub, you can get something like this Startech unit.  They have a value of the price difference in quality el-cheapo consumer centers.  Good thing that one is if you have decent 12v in your system power supply, you can feed the hub immediately that and use a USB port as a supply of 5V/500mA for relays/LEDs/etc your DAQ (s) hunt.

  • Scripture cannot be performed because the number of data channels does not match number of channels in the task.

    My VI works as a motion detector.  Whenever the motion detector is activated, the led lights up and a beep is heard (a switch will exercise my motion sensor).  Once all the lights are on, the system reset is supposed to light up, and then the other three lights turn off back waiting to be activated once more.  My attachment saved as "sensor project", I have the VI working with data acquisition by implementing a case of random number, and the VI works here to give a demonstration of what I'm trying to work in favor. Any information would be greatly appreciated.

    You have some problems of logic and data flow.

    Once all three loops stop sensors, all outputs are necessarily true, then the case and a compound bow structure in the loop (reset) next is useless. Because the boolean in the fourth loop ending is immediately true, the loop to stop and not care about the State of the reset button. Maybe you should connect the termination condition to the wire going to the system reset light instead. Since it is also a polling loop, it needs a small wait. Once you press reset, the VI full and stops. (Do not use the continuous operation mode!).

    Solution: Create a state machine with a single outer loop. You have 4 x code too!

  • What is the maximum number of channels in the DCS files?

    Hello, I have a file with black and 5 spot channels. When uttering a pdf, only the last channel appears and everything else is white. If I delete a single channel, any channel, if appears with all the plates on display. I created a DCS file, added a new channel to spot both for some art was printing in this channel. When I go past 4 channels, it's when things get strange.

    The file prints correctly, however will not display correctly in the PDF file. And I need to send a correct search PDF to the client. Anyone any ideas how I can fix this? Thank you.

    Art 4 Channel.pngArt 5 Channel.png

    In Adobe Reader preferences-view page - try affecting overview of overprinting 'always' or save pdf / x formats.

  • How can I get a query to count a number of channels?

    I want the query to count, to me, how many holidays, there are in the USA in my table. But I'm not sure how to retrieve the result of a string or varchar2 data type. That's what I've tried so far.

    Select count (COUNTRYVIS) < < this column contains all the countries visited
    of "IT220_HOLIDAYDETAILS" < < this is the table where the column is
    where COUNTRYVIS = 'USA' < < this is the result, I want to count

    ORA-00904: 'USA': invalid identifier < < this is im error message get, is there a way to count the channels?

    Thanks in advance!

    This has nothing to do with the APEX. Please post any fundamental questions of SQL on the + {forum: id = 75} + forum.

    In any forum OTN, alll code must be posted wrapped in .

    ...\
    

    Tags as described in the FAQ:

    select count(COUNTRYVIS) -- this column contains all the countries visited
    from "IT220_HOLIDAYDETAILS" -- this is the table where the column is
    where COUNTRYVIS = "USA" -- this is the result i want it to count
    

    You seem to have trouble with the distinction between identifiers and literals text. Tip: Use the double quotes, other apostrophes.

    Note that quoted identifiers are usually not a good idea.

  • Discover the number of physical channels

    When you configure a DAQmx device in LabVIEW code, is there a simple way to discover and to report the number of physical channels that have been selected?  I looked for property nodes to do this, use the "Physical channel" control as well as the indicator 'task out', but I have not found anything so far.  Any help would be greatly appreciated.

    Found!

    Measurement of e / s-> NI - DAQmx-> Advanced-> Confi task-> task node-> NumChans (number of channels)

Maybe you are looking for