input analog/sync problem

Hi all

I use USB - 6363 CVI 2013 with patches and trying to solve this problem for days. But just does not know what the problem is.

Basically I have a finite periods display analog sine wave (which works fine), then I would like to receive (or other stuff) to an analog pathway for the objective test.

The thing is that I can't get anything this either port HAVE, straight zeros in this table. I tried to put some DAQmxCfgAnlgEdgeStartTrig on the port of AI0 but still no result. and right now

I don't have the ability to test if APFI0 method will work or not. So now I'm on an internal trigger.

Here's what I did to get so far, no error. But all I see on the result of the sinearrayfin table is zeros. sinearrayf matches the entry and tested to have the data in it.

sinearrayf = (float64 *) malloc (800 * arraysize4 * sizeof (float64));
for (int f = 0; f)<>
{
sinearrayf [f] = sinearray (float64) [f];
}
sinearrayfin = (float64 *) malloc (800 * arraysize4 * sizeof (float64));
for (int f = 0; f)<>
{
sinearrayfin [f] = 0;
}

error int = 0;
char errBuff [2048] = {'\0'};
trigName char [256];
Written Int32 = 0;

 DAQmxErrChk (DAQmxCreateTask("",&AItaskHandle));
DAQmxErrChk (DAQmxCreateAIVoltageChan(AItaskHandle,"/Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(AItaskHandle,"",800000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,800*arraysize4));
DAQmxErrChk (GetTerminalNameWithDevPrefix(AItaskHandle,"ai/StartTrigger",trigName));

DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle));
DAQmxErrChk (DAQmxCreateAOVoltageChan(AOtaskHandle,"Dev1/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(AOtaskHandle,"",800000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,800*arraysize4));
DAQmxErrChk (DAQmxCfgDigEdgeStartTrig (AOtaskHandle, trigName, DAQmx_Val_Rising));

DAQmxErrChk (DAQmxWriteAnalogF64 (AOtaskHandle, 800 * arraysize4, 0, 10.0, DAQmx_Val_GroupByChannel,sinearrayf, & writing, NULL));
DAQmxErrChk (DAQmxRegisterDoneEvent(AOtaskHandle,0,DoneCallback,));

DAQmxErrChk (DAQmxRegisterEveryNSamplesEvent (AItaskHandle, DAQmx_Val_Acquired_Into_Buffer, 10000, 0, EveryNCallback, NULL));

/*********************************************/
Starting code DAQmx
/*********************************************/

DAQmxErrChk (DAQmxStartTask (AOtaskHandle));
DAQmxErrChk (DAQmxStartTask (AItaskHandle));
      
Error:
If (DAQmxFailed (error))
DAQmxGetExtendedErrorInfo (errBuff, 2048);
If (AItaskHandle! = 0) {}
/*********************************************/
Stop DAQmx code
/*********************************************/
DAQmxStopTask (AItaskHandle);
DAQmxClearTask (AItaskHandle);
        
}
If (AOtaskHandle! = 0) {}
/*********************************************/
Stop DAQmx code
/*********************************************/
DAQmxStopTask (AOtaskHandle);
DAQmxClearTask (AOtaskHandle);
        
}
    
    
If (DAQmxFailed (error))
printf ("error DAQmx: %s\n",errBuff); ")

.......

Int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData)
{
Int32 error = 0;
char errBuff [2048] = {'\0'};
public static int totalAI = 0;
readAI of Int32;

DAQmxErrChk (DAQmxReadAnalogF64 (AItaskHandle,-1, 10.0, DAQmx_Val_GroupByChannel,sinearrayfin, 800 * arraysize4 & readAI, NULL));

fflush (stdout);

return 0;
}

What I see from a quick look at the code that you understood, looks that you stop tasks without giving a sample of 10,000 time to accumulate in the buffer.  This section of code here: does the following:

    /*********************************************/
Starting code DAQmx

/*********************************************/
DAQmxErrChk (DAQmxStartTask (AOtaskHandle)); Start the task of AO
DAQmxErrChk (DAQmxStartTask (AItaskHandle)); Start the task of HAVE

There is no waiting or anything here which would be
stop the section error to be executed immediately
Error:
If (DAQmxFailed (error)) / / there is no error if this section does not
DAQmxGetExtendedErrorInfo (errBuff, 2048);
If (AItaskHandle! = 0) {/ / there is a task of so HAVE this section not}
/*********************************************/
Stop DAQmx code
/*********************************************/
DAQmxStopTask (AItaskHandle); Task of is stopped and deleted
DAQmxClearTask (AItaskHandle);

}
If (AOtaskHandle! = 0) {/ / there is a task AO so this section runs as well}
/*********************************************/
Stop DAQmx code
/*********************************************/
DAQmxStopTask (AOtaskHandle); Task of the AO is arrested and cleared
DAQmxClearTask (AOtaskHandle);

} / / The two tasks are arrested and cleared samples before
are allowed to accumulate in the buffer and call
the callback to perform playback DAQmx.

If you look at the example of ' ContAck - IntClk.c ", he has a GetChar(); function between startup tasks and the block of the error.  This actually awaits as you press a button before stopping and compensation tasks.

Tags: NI Hardware

Similar Questions

  • Corporate e-mail Sync problem

    I had a corporate sync problem, but it was because of my corporate email Exchange Server - nothing to do with the unit of Motorola or the Android 2.2 platform.

    I found corp email sych to cause problems. Several times, it has just stopped working. Sometimes, I get the warning symbol saying that there is a problem. Other times, it just is there and can't get new messages and sends no mail in the Outbox. There is usually a snake of spinning in the corner, which suggests that he expects something to happen seems to be blocked.

    All the time that what happens, my iPad is synchronization of the same exchange server without any problems.

    Yesterday, when the phone is in mode, I turned off and he took the synchronization when I powered it upward.

    It's just one of the many issues that I have with the phone which makes it unreliable to use for business.

  • analog sync of input with the onset of the digital output

    I'm trying out an analog signal to a file with a specified frequency samples.  I also need a digital output to trigger a measurement at a frequency specified on a separate system.  The frequency is controlled by the loop exits and timed when the iteration number divided by the period is exactly a whole number.

    Both outputs work.  The problem is that they are not synchronized.  The analog output amounts to about 0.5 ms faster than the digital signal.  (I checked with an oscilloscope)  They both start in the 1 ms each loop runs for, but I really need them to start at the same instant.  What can I do to synchronize?  Also, if I'm going in the wrong direction complete, please indicate.

    I use a card PCI-6723, which I think someone at some point, said not having a material sample clock.  That's why I try to use a timed software loop.

    Hi NEA.

    You must use the 6723's built-in calendar to accomplish what you want.  As the digital output subsystem is only clocked by the software, an appropriate solution should be to use one of the counters to the pulse output.

    The attached code should show how.  You can use the counter to output a pulse all samples of the AO N task.  Material requires the initial delay to have a minimum of 2 ticks, so the meter will be behind the task of the AO by 2 samples in this case.  There are different ways to work around this problem if you need (for example write two samples of 0 first).

    Best regards

  • To input analog shutdown when the analog output is completed and synchronization

    Hello

    I'm trying to get my LabVIEW program to send analog output to a computer and read acceleration using the cDAQ-9184. Chassis output that I use is the NI 9263 and the chassis of entry is the NI 9234. I generate a signal of white noise using LabVIEW Express signal generator.

    The first problem I have is the synchronization. I had an old VI that has begun to measure the acceleration just about a second after the entry has been given to the machine. I used the LabVIEW tutorial on how to sync the analog input and output, only to discover that it does not work with two different hunts. Then I found another tutorial that shows how to synchronize different frames between them.

    The second problem is the cessation of the LabVIEW program. What I want to do is to generate the signal and then simultaneously send and read the input and output analog, respectively. It is because I don't want a phase difference or any shorter signal for a direct comparison. But as soon as the signal is sent to the machine, I want the entry to stop analog playback and then then the LabVIEW program must stop. I want to be able to choose any length of signal to be generated and stop as soon as the entire duration of the signal has been sent to the machine.

    I tried 'DAQmx stop', "DAQmx Timer" and 'DAQmx's task made?' and none of them have worked for me. It is also my first time on a forum posting, so I hope I gave enough information. I enclose my VI as well. The VI shows I read an entry for the analog input voltage, but I am only using this to try to get to the work programme.

    I'd appreciate any help I could get.

    Thanks in advance

    Peter

    Hi Peter,.

    I have some recommendations for you that I think you will get closer to your solution. First of all, I assumed you meant that you had 1 chassis (cDAQ-9184) who had two modules in it (NOR-9263 and NOR-9234). My next steps are based on this assumption, so if it's wrong, please let me know.

    For your first question about the synchronization, the code you provided is very close to what you need. You need to do, however, implement architecture master/slave for startup tasks DAQmx functions. To do this, you can add another frame to the flat sequence structure and put the master start task (input voltage) after the start slave (output voltage) task.

    To manage your second question and that the program ends at the point where you, the first step is to get rid of all the logic that you use with the local variable of length of time. Rather than use this logic, just wire the node "task performed?" of "is task performed?" operate to stop the loop. This will cause your loop to stop as soon as the signal is sent to the machine.

    I have some other recommendations for you that will increase the performance of your program:

    (1) rather than writing on file inside the last loop, you can use the DAQmx Configure Logging (PDM) .vi. You will place this VI between DAQmx Timing.vi and DAQmx Start Task.vi to the task of the analog input voltage.

    (2) after the last while loop, you want to stop the task and analog outputs as well with another DAQmx stop Task.vi.

    (3) rather than using a local variable for the entrance of displacement and wiring it in the DAQmx Write.vi, you can wire directly from the output waveform of the wave to build function node.

    That should help you get started in the synchronization of these tasks.

    -Alex C.

    Technical sales engineer

    National Instruments

  • OSX 9.3.1 icloud notes sync problem

    Hey all.

    I'm having a problem with the timing of my notes to my iPhone 6s iCloud more (iOS 9.3.1).

    I have confirmed that the problem lies in the phone as my Macbook of synchronizations to my account iCloud without problem.

    What I tried:

    (1) hard reboot iPhone.

    (2) disable and enable synchronization of notes in the iCloud settings.

    (3) input/output panel to iCloud.

    (4) lights up "on my iPhone" notes, create a note it and move to iCloud notes.

    (5) change my password to iCloud.

    Signed 6) input/output to icloud on my macbook (which works fine).

    (7) reset my network settings according to the other discussion ( only note not synchronized new iPhone 6 more )

    8) switched on notes to my alternative email address, then created a note on Macbook (not even these notes synced to iPhone).

    Well, what I can do.

    Another that pointed out, everything else on my iPhone works perfectly.

    Other suggestions or apple is aware of this and working on a solution?

    See you soon!

    GW.

    Okay, so I managed to solve the problem and all I had to do was sync my phone to iTunes.

    That seems to have fixed.

  • input analog sbRIO to-1V

    Hey guys,.

    I have a question about the SBRIO9636 with the eval Board. Analog is configured + 1V single ended. Now, if I read the analog input and it is not inserted into the port of signal, it me gives-1V, why he doesn't give me 0V? As a constant value, I can't imagine problems EMV.

    If there is a signal inserted it works fine.

    Kind regards

    Slev1n

    If the signal is physically disconnected, it will float.

    Look here for an explanation: http://digital.ni.com/public.nsf/websearch/4E9B8B3F8FD3A31B862562B5004EA1D9?OpenDocument

  • Digital input and output problem

    Hello:

    I do a test for digital i/o:
    for a table of the digital signal to an output of data acquisition in the digital input to detect the output signal.
    (bascially, it's like a loop that goes outside the material)

    It's pretty simple, as shown in the attached fichier_1.
    It works well.
    The manual light switch controls, which means that inputs and outputs are ok.

    Then I went on the low level DAQ for better speed, as in attached fichier_2.
    But it does not work. Especially when I pressed stop to abort the loop, an error has occurred:

    To speed up, I went to the low-level data acquisition as the fichier_2 attached.
    But it does not work. Espeically when I press the "stop"button to exit the loop, the error occurs.

    Possible reasons:

    Requested value is not supported for this property value.
    The value of the property may be invalid because it is in conflict with another property.

    Property: SampTimingType
    Asked the valuelarge clock
    You can select: on request

    I don't understand why the sampling time has a conflict here.
    (It is probably just something very simple in data acquisition, but I checked a few examples and did not find a clue).
    Hope someone can give me a suggestion.

    Ultimately, my goal is to make the attached file_3.
    In this one, I generate a digital output, and then lead to the entrance.
    Then I can take it as a signal to trigger my other task.

    Note:

    I use a similar conti signal to control one of my camera.
    I need to sync it with my another task.
    So I think to generate a digital output (which share the same clock as the signal similar to the data acquisition device), then put it in one of the digital input.
    By detecting this digital input, I can trigger my task and synchronize with this signal similar.
    My camera's USB-6211.
    I am aware of the latency of USB, but once the value is a constant value, then the synchronization is always good for me.
    Actually, I was using an analogue at the entrance of the to do it before, it may work, but the synchronization error is too big for me.
    I need to do some calculations/judgment for this analog value, which makes the time difference varies.
    So I'm trying digital entry now and I hope that the digital input can trigger my task with a stable latency.

    Thank you very much

    Have you looked at the specs? It clearly states that the digital I/o is a programmed software. You have not any hardware clock at all. The best rate that you could possibly achieve is around 1 kHz and which would have a considerable jitter the nature of non-determimistic of windows.

  • How to distinguish the samples from 6 different inputs analog

    Hello everyone, I'm still new to NOR-DAQmx. I write a C++ program that reads 6 analog inputs of the card PCI-6220.

    Basically, I created 6 virtual channels in a single task, looks like I'm acquisition of required inputs.

    However, the problem is that I don't know which sample comes from what analog input channel. I put the fill mode "DAQmx_Val_GroupByChannel".

    Please help me, how can I distinguish between samples of different analog inputs.

    Best regards from Kazakhstan,

    Khassan

    Khassan,

    Channel order would be decided in the order in which you added your channels to the task.  So let's say I create a task and adds three channels and add them in the order ai0 ai1 and ai2.  If I set the fill to "DAQmx_Val_GroupByChannel" mode, DAQmxRead will copy data in "readArray' such that ai0 data all together, followed by the data of ai1, which is followed by the data of ai2.  The size of each of these sections of the buffer must be returned through the 'sampsPerChanRead' argument to read.  So if were to call read and DAQmx returned 5 for "sampsPerChanRead", then my data buffer would look like this:

    AI0, ai0, ai0, ai0, ai0, ai1, ai1, ai1, ai1, ai1, ai2, ai2, ai2, ai2, ai2

    Hope that helps,

    Dan

  • How to use 1-channel analog input for start/stop aquire sample second channel input analog?

    I have a little problem. I've just been programming in labview for 2 weeks.

    I'm trying to figure out how to use my channel of analog input on the USB-6009 case for start/stop (reference trigger and start) presented to the second analog input channel samples.

    I need the first analog input string to operate continuously and control sampling on the second.  When the second channel will start sampling program brings a new graph each time and saves it (I have all this that figure out).

    How can I configure the trigger so the lance program presented in for the second channel when the 1 channel reached above 2V (e.g.) and stop when it falls below 2V.

    I use a pressure force sensor on the first channel that gives me straight (up to) 5 V when it is pressed and nothing when it is not...

    Thank you.

    Grand... Thanks for the information!

    But can't I then make a 1 channel instead and wait until that meat of the max element value?

  • Analog output problem

    I'm working on a project that gets an analog input by thermocouple and using temperature data according to certain criteria, the system will give analog current. The problem is then that gives the result of the daq assistant, only the preference of voltage is available in analog output and the program displays PCI-6036E and two channels of it. Current output Anolog is possible or if I use the output voltage must be to my connection go OR-6036E(it is inside the computer case) or I could use SCXI-1300 as I used to get input?

    The 1102 is only a voltage input module, that is why it does not appear in the DAQ Assistant.  You will need to either straight out of the 6036E or you can buy a module for SCXI analog output as the 1124 or 1581.

  • wireless sync problems

    Hi guys, I hope one of you can help me with what I could not find anything on gogle yet.

    I am trying to set up synchronization between the z2 and my PC wireless, I had previously done this correctly then had to perform a factory reset on the phone and now its is no longer functional.

    The problem is that my pc does not appear in the field of USB connectivity in the settings, but when I try to pair I get the following message: "the pc is paired with your phone. To set up the devices again, delete pairing. »

    Although there is no place on the phone I can find to unpair. However, I see my name of the PC under the option launch and in smart connect... thougb I'm not sure wether this has nothing to do with the wireless sync, and in any case I don't see a way to remove these pairings either.

    I tried to present re - install the sony pc companion app and got the same messages again.

    Any input or help will be greatly appreciated

    OK, so finally, there is a file in the root of the internal phone storage named (laptop) that is the name of my PC. Once I moved the file to another folder and tried pairing again everything went well, and a new "LAPTOP" file has been created.

    So everything now works as it should. Thanks for your promt help Johan

  • Ipod160GB classic sync problem

    My iPod classic 160GB will not synchronize last purchases iTunes because of the iCloud required on iPod setting. Please indicate where to find this setting?

    There is no setting to iCloud associated with iPod (except iPod touch).

    Confirm that your latest iTunes Store purchases are downloaded to the local storage on your computer.  You can see that the iTunes Store in your iTunes purchases, even when they are not downloaded.  iTunes can stream items purchased from Apple (aka "iCloud") servers.  However, iTunes can't sync your iPod with songs that are only stored in iCloud. they must be stored locally.

    To check, find one of the songs recently purchased which will not sync to the iPod (in the iTunes music library).  Right click it and get the information.  On the Info window in the file tab, browse to the locationSituation shows a path on the storage of your computer, or does it mean iCloud?  If she says iCloud, right click on the song in iTunes and download.  Or, if you see a symbol of cloud with the down arrow next to the name of the song, click on it to download the song.  Repeat for other purchases that synchronize.

    If this isn't your problem, please post back with more details about your situation.

  • AT300-101 using Microsoft Exchange Sync problem

    Dear Sir or Madam,

    I use an AT300-101 (ICS 4.0.3) and try to synchronize with my hotmail account.

    Syncronising the AT300 via the Exchange account does not work correctly. It works once in two days.

    The errormessage said, that the server is currently not repsonding. Even to re-create the exchange account after removing it, does not work properly.

    As sync my hotmail account via the Exchange with the other ICS 4.0.3 android devices (HTC, Samsung, etc.) works perfectly the problem seems to be the Tablet and not the exchange server.

    Do you have any idea how to solve this problem.

    Best regards

    Schemmi

    Hello

    Have you tested this after resetting the default Android system?
    From my point of view could be a problem in exchange server as mentioned here by MS:
    http://support.Microsoft.com/kb/2563324

  • Sony XBR-55X850D audio sync problem with Xbox One S

    Recently bought a new Sony X850D 55 '' TV, it's my 3rd Sony TV the past 10 years, and the first I had a problem with.

    I use the TV mostly for games on my Xbox One S, but have found that there is some dramatic audio synchronization problems. The sound coming out behind what is displayed on the screen (IE. Close door, sound audible is later). Xbox is connected to the TV via HDMI to input 1. I also have a bar of his (CT380) connected via HDMI output HDMI-4 ARC.

    I tried with and without the Soundbar without result. 3 different cords HDMI do nothing. Using my old Xbox One compared to the new One S has no difference. Question was not present on my old Sony TV. Tried with ClearAudio on and out, no change. I can't find all the parameters of sound synchronization in both of the TV, bar, or Xbox.

    Running Version 5.1.1

    Thank you

    Jerome,

    I could solve my problem using HDMI from the Xbox to the sound bar HDMI then another sound to the TV bar.

    Thanks for the good help!

  • OI 9 to 12 iTunes sync problems

    Since my iPod Touch iOS Update 9, I have the following problem:

    1 synchronization via USB takes much longer than before iOS 9

    2. whenever I have sync iPod, all cover is reloaded on the iPod, even if it is already on the iPod, and no new cover art has been added.

    3. If I edited a playlist in iTunes, the old version of the playlist is renamed with a number after the name, and both versions are stored on the iPod and iTunes, until I manually remove the old version.

    The month last Apple bolloxed draw picture with one update the wrong printer driver.  Now, Apple has used an iOS update to water my iPod.  Should I just avoid all Apple software updates in the future?  It's time to finally make the jump to Linux/Android?

    Mac OS X 10.9.5

    iTunes 12.3.2.35

    iPod Touch 5 G

    iOS 9.2.1

    The following steps should solve the problems around the synchronization, assuming that all the content you want in your library.

    (If it isn't see recover your iTunes from your iPod or an iOS device)

    1. Backup device.
    2. Restoration as a new device.
    3. Restore the backup that you made earlier.

    NB. A feature introduced with iOS 9 called thinning or slicing app app allows each device to download just the code and resources required by this device, resulting in smaller downloads and a better use of the storage on the device. Therefore the device is no longer the universal version of the application that can be installed on any device to transfer applications is no longer supported. You can however download past purchases to iTunes and/or to activate Automatic app downloads buy to make sure iTunes has always the apps you want on your device. Another change to the way the restorations are implemented means that all private data app is restored and apps that are not in the library are waiting for download on the iTunes Store on Wi - Fi, in a similar way to the restoration of the iCloud way works. Not having apps in your library is not the disadvantage that it once was, but you're still at risk of losing a favored app if it is removed from the Bank and you don't have a local copy.

    TT2

Maybe you are looking for

  • No wireless connection - can not operate the Satellite Pro M40

    Hi, first Post so hope I understand that I have Satellite Pro M40 A desktop connected to the router via Ethernet cable computer laptop used in another room with a Wi - Fi connection, I guess that means I had a wireless network? Re-installed Win XP an

  • Display becomes unresponsive, the mouse moves, no click

    I have a 2008 iMac that was a gift for my wife. Since I got it with there have been intermittent problems the display becomes unresponsive, the mouse moves, the clock does not update and you can not click on anything. the only way to fix it is to ssh

  • Gambling Y50 Lenovo problem

    Hello I recently got the Lenovo Y50. It has a 960 M GTX and an Intel Core I7 processor. When you try to play one of my favorite games (League of Legends), I realized that even on the lower settings, the Y50 runs only about 45 fps games. The specifica

  • How to configure Outlook Express

    original title: how to configure outlook I just want to set up outlook express

  • Lack of PlayerListener Messages

    I tried to get the "END_OF_MEDIA" event on a storm (v4.7.0.65 / platform 4.0.0.76). In the Simulator (4.7.0) the event is delivered, but never appears on the device of the event. I created the player like this: InputStream in = getClass().getResource