How to write a single line instead of the entire port?

Hello

I followed the example for writing to the digital line as follows

int taskHandle;

given int [8];

char linename [] = "" dev2/port0 / line0:7 ";"

DAQmxErrChk (DAQmxCreateTask ("", & taskHandle));

DAQmxErrChk (DAQmxCreateDOChan (taskHandle, linename, "", DAQmx_Val_ChanPerLine));
DAQmxErrChk (DAQmxStartTask (taskHandle));
DAQmxErrChk (DAQmxWriteDigitalU8 (taskHandle, 1, 1, 10.0, DAQmx_Val_GroupByChannel, data, NULL, NULL)); Here the data have 8 digits
 
Error:
SetWaitCursor (0);
If (DAQmxFailed (error)) DAQmxGetExtendedErrorInfo (errBuff, 2048);
If (taskHandle! = 0)
{
DAQmxStopTask (taskHandle);
DAQmxClearTask (taskHandle);
}
If (DAQmxFailed (error)) MessagePopup("DAQmx Error", errBuff);

The example above shows how to write 8 binary to 8 lines, but how to write only one line? I try the following code, but it does not work

char linename [] = "dev2/port0/line 2;

...

DAQmxErrChk (DAQmxWriteDigitalU8 (taskHandle, 1, 1, 10.0, DAQmx_Val_GroupByChannel, & data [2], NULL, NULL)); Here the data have 8 digits

The data format for the DAQmxWriteDigitalLines() function will do exactly what you want.

The data format for the DAQmxWriteDigitalU8() function is a full port (even if you do not have a value of a harbour full of lines in your task).

Tags: NI Hardware

Similar Questions

  • How to choose a character style instead of the entire text selection when running a script?

    I have a script, which, after having selected the text, can change the appearance of the figures. This action, therefore, covers all the numbers in the document to help:


    01 If (app.selection.length! = 1)

    [... here, the rest of the script]


    How do I change this line to apply changes only to those numbers until the tag with a specific character style?


    Thank you.


    I tried to change this line which is to select all the numbers:

    If (app.selection.length! = 1).

    This line is all, but by selecting all numbers. It only checks if there is more than one selected item. Selection of texts always returns the length of 1. That's why this review.

    And given what I've offered before, all you have to do in Jongware script to match your needs is to add app.findGrepPreferences.appliedCharacterStyle = theStyle;

    Before findGrep().

    HTH

    Loïc

    http://www.ozalto.com

  • In the first 12 items, how to rotate a single clip without affecting the rest of the film

    In the first 12 items, how to rotate a single clip without affecting the rest of the film

    [Left non-technical Forum Lounge for forum specific program...] MOD]

    Select the clip, right-click then select rotate.

  • How can I display an error message on the listening port close popup without closing the popup.

    Hi Experts,

    JDeveloper 12.1.3.0.0

    How can I display an error message on the listening port close popup without closing the popup.

    Thank you

    Roy

    As its name suggests, close listener of popup is called when popup is closed so you can not do this.

    If you want to display the popup message, use your own buttons instead of the ok/cancel default buttons and close the popup programmatically.

    Dario

  • How to assign a constant name 'letter' to the USB port?

    My Compaq Presario with Windows 7 has two USB ports on the front and on the back.  I use both to the front to connect a drive hard ext to the back, usb flash drives and a camera. Everytime Iplug in the disk hard ext, the PC assigns a letter to port such as J.  The next time I plug the camera into the same port, the PC gives it a different letter and I need to go back up and reconfigre Norton where to back up.  How to assign a constant name 'letter' to the USB port?

    I think that the previous answer may have been cut off, but they were right. You assign it a letter on the USB port, you assign a letter to the device. With your drive plugged, if you right-click on the computer icon and select manage you will arrive at the computer management screen. Click the disk management icon and you should see your drive listed. Right click on that and you should see a choice to change the drive letter and path. From there, click change and select a drive letter for your device.

  • some how my taskbar stuck upside... but the entire screen is as usual so how do return to normal please reply soon

    some how my taskbar stuck upside... but the entire screen is as usual so how do return to normal please reply soon

    Hi Prakash,

    Thanks for posting this question in the Microsoft Community.

    As I understand it, the taskbar are stuck in reverse. I will certainly help you to get the problem resolved.

    Follow the steps and check out them.

    Simple move your mouse cursor over an empty area of the taskbar, click and hold the left mouse button and drag your mouse to the bottom of the screen.

    To keep it from moving again, you can do a right click on the taskbar and left-click on the option for 'Lock the taskbar'.

    You can navigate on the article for more information on the taskbar.

    Hope this information was helpful and let us know if you need more assistance. We will be happy to help you.

  • How to set up single-line message headers?

    Previously, in the message display area, I had configured Thunderbird so that a message appears that the subject of the message in the message header section just above the body of the message. But I just upgraded to to 38.1.0 and now I have in reserve, [address], in the header box, although I've seen-> headers-> Normal (Compact) set.

    Please tell us how to get back to the option just to display the subject line. Real estate vertical display is much too precious to not having the capacity of the old view of a single line.

    Thank you
    [email protected]

    Install this add on.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/compactheader/?src=HP-DL-featured

    The normal headers view removes the routing information only. It has nothing to do with what you are trying to accomplish.

  • Use: How to read a single line of names of channel or units?

    Most of the examples of programming to use use channel names in separate lines, as in the following example:

    Channel
    Name: time
    Type: time

    Channel
    Name: XShift
    Type: R64

    Channel
    Name: YShift
    Type: R64

    Most of my data sets have channel names and / or units in one line separated by tabs as

    "Dehnung" "Standardkraft" "Sensor" "Zyklusnummer" "PWM".

    « mm » "N" "V" « » « % »

    Is there a more effective way to add channels appointed and equipped with units along these lines to bike through some index variable? Like my channel number, etc. naming vary frequently, I would be looking for a more flexible solution, avoiding fixed table or names hardcoded sizes.

    I guess

    aMyChannelNames = split (File.GetNextStringValue (eString), vbTab)

    aMyChannelUnits = split (File.GetNextStringValue (eString), vbTab)

    for i = 0 to UBound (aMyChannelNames)

    Adjust the strings = Block.Channels.Add (aMyChannelNames (i), eString)

    Channel.Porperties ("Unit") = aMyChannelUnits (i)

    next

    could do the job - but it's the most effective way?

    Thank you for helping.

    Michael

    Hello Michael,

    I don't see the real problem.

    You read the header and split it into an array. This is information you have how many channels. Table size ubound depends on the line you have red and is not fix. Everything should be good now.

    You read the information and would divide the tables. Then, you use a loop to generate channels and set the properties. I don't think that there is a better way to do it.

    Kind regards

    Philipp K.

    AE | OR Germany

  • How to write a single value in an excel spreadsheet

    Hello

    I use an excel spreadsheet, as if it were an external code module. He does a lot of calculations, all I do is write an individual value, let calculate what it should only then read a return value from this.

    I already have a structure able to read a table, but could someone help me with a piece of code that could write a single value?

    (To read a value unique too may be practical)

    Also, I have the new LabVIEW 2009, so while a fancy to drop some code here as one. PNG, it would be nice to see if this new feature works!

    Thank you, Alec

    Try this. There are 2 point methos (get) and point (put) to read and write the value respectively to a cell in excel.

    Good luck

  • How can I gett margins lines more near the edge of the page.

    my work always starts too far in the page, and I want to spend more than near the left side if can get all the words on a single line

    ex: want this: totrtotyoyoytotyotooooptootp

    instead: tiourtrtyottotytyptypyty
    totititi

    In what program? If Word, please in forum word here.
     
  • In MXML, how can insert you a line break in the label of a mx:Button?

    In other MXML components, you can do things like use curly braces to incorporate scripts, use '& #13' and stuff like that in their text and label attributes.  Apparently the mx label attributes: Buttons are so locked that normal suggestions for other components do not work.  I might try just setting the labels in the main script of an MXML file or something, but it's a sloppy programming if it can be avoided (values of labels will be constant in this case).  Is there a way to put a line break in the attribute in MXML?

    Regarding the use "& #13", which gave me a line break at least, but any text to the right of this sequence has disappeared.  This makes me think that there may be a way to make this work, but so far I have not found the way.

    Thank you!

    The response occurred in the thread that I put at the beginning for this:

    http://StackOverflow.com/questions/11621952/in-MXML-how-can-you-insert-a-newline-into-the-label-attribute-of-a-mxbutton

  • How do I view his homepage instead of the previous session of Firefox?

    Hello

    I'm having a little trouble because when I close Firefox and reopen it, instead of the blank page, I put to show you me, show me my previous session. I shot all my addons and it has started in Mode safe, but it still does the same thing.

    I checked all the settings I can find, but nothing works. I have the latest version of Firefox.

    Any suggestions?

    One of my addons is the session manager but disabled, Firefox does the same thing.

    Thanks in advance

    Niels

    You can check if you have a user.js file in the Firefox profile folder that affects the pref browser.sessionstore.resume_session_once true value.

    You can remove the user.js file.

    You can use this button to go to the Firefox profile folder currently in use:

    Windows hides certain default file extensions.
    Among them are .html, .ini and .js, .txt, so you can see only file name without the file extension.
    You can see the type of actual file (file extension) in the properties of the file via the context menu in Windows Explorer.

  • How oracle write "Checkpoint is not complete" in the journal of alerts?

    DB version: 10.2.0.4/RHEL 5.8

    In a batch run, we met a lot of 'Checkpoint not finish' errors in the alerts log.

    Later we discovered that the ORLs were only 50 MB in size and that DB had only 3 redo log group. Since this is the likely reason, we will create at least 10 groups of Redo log and increase the size of Redo log at 500 MB.

    But I want to know what exactly are the causes oracle to write "Checkpoint is not complete" in the journal of alerts?

    For the purpose of this discussion, I guess we have only 1 ENT by redo log group. Is my assumption correct below?

    ORL1

    |--> ORL1 file got full, then LGWR begins writing to the file ORL2. Control point occurs at the command of journal

    |                    DBWR writes updated the blocks associated with the entries of data files again ORL1

    |

    V

    ORL2

    |-> ORL2 file obtained full, LGWR wants to start writing to the file ORL3. Checkpoint is initiated to the log command.

    |                    But the control point cannot be completed for reasons unknown

    |

    V

    ORL3

    |---------------->

    Your assumption is only partially right.

    I like to illustrate

    ORL1

    |

    |---> ORL1, file got full, then LGWR begins writing to the file ORL2. Control point occurs at the command of journal

    |                    DBWR begins writing modified blocks associated with the entries of data files again ORL1

    |

    V

    ORL2

    |---> ORL2 file obtained full, LGWR begins writing to the file ORL3.

    |                    Checkpoint for ORL2 is initiated to the log command.

    |

    V

    ORL3

    |

    |---> ORL3 queue (the last member) also got full very quickly. LGWR wants first of all the 'new round '.

    writing (re-use) to ORL1. But the outlined point of control of the previous cycle ORL1 journal is

    not finished yet! .

    Basically, you get this error when LGWR tries to reuse a log file of roll forward online (ORL1 in the example above) and considers that it cannot be.

    This is because the remaining files (ORL2 and ORL3) ORL got entirely written before DB writer finished modified checkpointing associated blocks ORL1 again.

    Until the ORL1 control point is completed, DB crashes effectively and user sessions must wait until LGWR can reuse safely ORL1

    Yes can help a larger size of log roll forward to 10 groups. , But make sure that the input/output subsytem where are stored the ORLs has no latency problem.

  • How to write a script to report to the page number in a book?

    Hello

    Is it possible to write a script to report to the page number in a book by pop up a text file.

    What I'm trying to say:

    first of all, I opened an indesign book, thenI run the script, the script can gen a text pop-up file and the list of files, the file names and page numbers (only the star number of each file) and the script can also tells me that I have two files or more overlap page numbers (if any).

    sample:

    book3.jpg

    report like this:

    01 table of contents 1
    02 2 Summary
    03 the financial of the 3 games
    Statement by the President 4 04
    05 MD and A                                 7
    06 12 CG report
    Report of the directors 07 17
    08 18 auditor's report
    Profit and loss account 09 19
    profit and loss 20 10
    11 equity change 20
    Cash 12 21
    13 notes on the 22 account
    14 42 corporate information

    File have the page number of overlap:

    profit and loss 20 10
    11 equity change 20

    Thank you

    Is that what you need?

    var book = app.activeBook,
        _content = [];
        overlap = [];
    for(var i =book.bookContents.length-1;i>=0;i--)
    {
            _content.push(book.bookContents[i].name + "\t" + (book.bookContents[i].documentPageRange.replace(/-[^-]+$/g,"")) + "\r");
            if(book.bookContents[i].documentPageRange == book.bookContents[i-1].documentPageRange)
            {
                    overlap.push(book.bookContents[i].name + "\t" +book.bookContents[i].documentPageRange + "\r" + book.bookContents[i-1].name + "\t" +book.bookContents[i-1].documentPageRange);
                }
        }
    alert(_content.reverse());
    alert(overlap.reverse())
    

    Kind regards

    Cognet

  • How to close a jmf rtp session when the entire file is sent.

    I use jmf to stream a video file from one client to another, everything seems to work fine except for the fact that I don't know how to close the prosessor and the session/datasink on the transmission side when customers the clientis done streaming, I can close lets say after 60 seconds of starting, but I am not able to understand how to stop when the entire record is streaming. I tried to use the datasinklistner when sending the video and the following code
    public void dataSinkUpdate(DataSinkEvent event) {
    
             if (event instanceof javax.media.datasink.EndOfStreamEvent) {
                 endOfStream = true;
    
             }
         }
    but the endofstream event is never received from the data source.

    the problem is that it works very well if I using 20 second video and I close the datasink and the processor in 60 seconds, the entire file get listened to but if I have a file for more than 60 seconds, then just file is reduced to 60 seconds.

    I also tried to use a sessionmanager a sessionlistener and a sendStreamListener with the following code
    /**
         * SessionListener.
         */
        public synchronized void update(SessionEvent evt) {
    
    
        }
    
    
        /**
         * SendStreamListener
         */
        public synchronized void update( SendStreamEvent evt) {
            System.out.println(evt);
    
         if (evt instanceof InactiveSendStreamEvent) {
              flag=true;
              System.out.println("done");
    
    
         }
         if (evt instanceof ActiveSendStreamEvent) {
    
             System.out.println("start");
    
    
        }
        }
    I ran the code and send files and everything, but neither an activestreamevent nor an inactivestreamevent happens but the file is currently distributed correctly

    user13490676 wrote:
    could this be a problem with jmf itself that the endofstream don't get generated for the playing of a file data source

    In this case, that would be the problem... more that likely there is something odd about the file, maybe it doesn't have a duration set in the header and JMF treats it as a live stream.

    You can always write a custom data source that passes right through the entrance of a normal data source and then generate the EndOfStream event yourself... maybe based on a timeout counter or failure? I have not received all the data in x seconds or after x attempts, so I guess that the file is... Or when you have read enough data that the file cannot have more (read > = file header / data file)...

Maybe you are looking for

  • Toshiba Assist for Linux OS

    Hello! I started using Ubuntu OS some time ago and I m wondering if there is a correct version of the Toshiba Assist for Linux driver. I searched but nor the browser on the driver download page, or I'm not ;| What I want is to know FN button options

  • Satellite A210-287 - ATI Radeon Mobility HD 2400 and laggs in game

    Hello everyone, for 3 weeks I lagg in game, but I don't know why.My ping is normal and my internet connection is normal 2 My question is, what can I do now? How can I get the laggs away?Updates? Where I becomme these updates? THX 4 help Satellite A21

  • show remote cursor position

    Hello I have attached an exaple where I want to point my cursor x position on my remote VI, but it doesn't seem to work? All other registered events dynamically do not work... but isn't the value to a number change? Best regards Thijs

  • How to make a copy of my own personal dvd?

    I need info on what to do when I insert my dvd and then I want a copy of the eact of it. Hopefully the instructions won't be easy. Please help someone. Thank you

  • Constantly freezes, vista, e-machine

    HelloI constantly get freeze ups. Download the page blue kernal, mini dump, crash dump, etc..Especially when I try to run your antivirus software. I had AVG, it kept the fact that. Then I put Avast. Computer won't let other antivirus, but windows to