Clearing a digital write

NI cDAQ-9178 and CDAQ-9481 on windows 7. I have a sub vi that runs over and over that will write to the relay module.
For memory management, is it better to clear a digital write each time it runs in the sub vi, or wait till the program ends and clear the task?
Solved!
Go to Solution.

bassinbc wrote:
NI cDAQ-9178 and CDAQ-9481 on windows 7. I have a sub vi that runs over and over that will write to the relay module.
For memory management, is it better to clear a digital write each time it runs in the sub vi, or wait till the program ends and clear the task?
I'm not sure exactly what you mean by "clear a digital write each time it runs in the sub vi". I assume that you're using the DAQmx API, have created an output task prior to the sub vi, are writing the boolean in the sub vi, then closing the task when you're finished using the hardware (eg. cleanup). But I can't tell any more from your description and I confess the terminaology you use is not clear to me. Do you have example code? As far as I'm aware the digital output status is maintained between "writes" so there is only a need to write when the output status needs updating (ie negating), but I'm not especially familiar with the two DAQs you mention. If they work the same way as the ones I'm familiar with, then the only time I "clear" a write is to reset the output status to False on application shutdown.

Similar Messages

  • What is labview digital write-to-line logic high voltage?

    i'm using a pci-6503 daq hardware and cb-50lp.I'm currently doing a project to interface a labview vi to a programmable chip(downloaded with a vhdl program),using the daq hardware.The chip must function according to the labview program.I'm using 2 digital write-to-lines and 6 digital read-from-lines to interface to the chip.
    Problem:
    the 6 digital read-from-lines are able to read from the chip,but the 2 digital write-to-lines are unable to reach a logic high of 5v.This means that the labview vi can only read and unable to write to the chip to function(only one way communication).In the daq wizard,when using the test panel to test the individual lines of port a,b and c,it is able to write a good
    logic low and good logic high(5v),even when all the lines are being used altogther.But when the labview vi is being run, the write-to-line cannot write a good logic high,thus unable to interface completely with the chip.
    Please advise.Urgent!
    grays

    LabVIEW does not do anything different to the PCI-6503. NI-DAQ outputs the same 5V from MAX and LabVIEW. Are you sure the FPGA isn't driving 0V on the same line? You could test this by putting a small resistor between the FPGA and the DAQ card. See what the voltage is across the resistor.
    Even at 2.5mA, the 6503 should output 3.7V.

  • How to config the digital write-to-line so it would independent when more than one is being used

    when one digital wirte-to-line is used in the labview vi, a good logic high(5v) can be read using a voltmeter,but when two or more digital write-to-lines are being using at the same time,the logic high seemed to have split voltages and thus having a bad logic high.how to make sure that in the labview program,that when many digital write-to-lines are used at the same time,all of them can abtain a good logic high (around 5v).
    I need the solutions urgently.
    grays
    np

    Hello,
    The probable reason you are seeing the behavior you are is due to a reconfiguration of the digital port. The Write to Digital Port VI is setup to configure the entire port, then write to one line (default settings). If you reconfigure the port it will reset all the lines, and then write your new value. You will want to use the iteration input on the Write to Digital Line so you can avoid the reconfiguration issue.
    The first time the Write to Digital Line is executed in your code wire a 0 to the iteration (or leave it unwired). This will configure the port for write and write your first value. The next time you use the write to digital port VI wire an integer greater than 0. This will bypass the configuration step and simply write the new value to the
    line. You can open the Write to Digital Line VI to see how the iteration input effects the execution and configuration of the digital ports.

  • DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file

    Hi
    DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file
    Two main
    sections:
    1)     
    Perform
    write and read operations to and fro different spread sheet files, such that
    each file have a single row of 32bits different binary data (analogous to 1D
    array) where the left most bit is the MSB. I don’t want to manually enter the
    32 bits binary data, I want the data written or read just by opening a file
    name saves with the intended data.
          2)     
    And
    by using test patterns implemented using the digital pattern generator or  build digital data functions or otherwise, I need to
    ensure that the     
                binary data written to a spreadsheet file or any supported file type
    then through the NI-USB 6509 is same as the data read.
    I’m aware I can’t use the simulated
    device to read data written to any port but if the write part of the vi works I
    ‘m sure the read part will work on the physical device which I’ll buy later.
    My Plan
    of action
    I’ve
    created a basic write/read file task and a write/read DAQ task for NI USB 6509
    and both combine in a while loop to form a progress VI which I’m confuse of how
    to proceed with the implementation.
    My
    greatest problem is to link both together with the correct functions or operators
    such that there are no syntax/execution errors and thus achieve my intended
    result.
    This
    project is one of my many assignments for my master thesis, so please i’ll
    appreciate every help as I’m not really efficient with LabVIEW programming but
    I prefer it because is fun and interesting if I get to know it.
    Currently I’m
    practicing with LabVIEW 8.6/NI DAQmx 8.8 Demo versions and NI USB 6509
    simulated device.
    Please see
    the attached file for my novice progress, thanks in
    advance for the support
    Rgds
    Paul
    Attachments:
    DIO_write_read DAQ from file.vi ‏17 KB

    What does your file look like?  The DAQmx write is expecting a single U32 value, not an array of I64. 
    Message Edited by vt92 on 09-16-2009 02:42 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • Mydaq digital write

    I'm trying to use a myDAQ to send digital outputs to three heater controls, to turn the heaters on an off with the digital signals.  After trying to use the regular DAQmx express vi and not having any luck, I read about the NI Elvismx express vis in the myDAQ user manual.  Yet still we can't get the vi to work in our program to communicate with the myDAQ device and send out the necessary signals.  We're trying to use the Elvismx Digital Writer.  Attached are the two error messages we've gotten.  If anyone can tell me what we're doing wrong and/or offer any advice/suggestions to fix the problem, I'd greatly appreciate it.
    Thanks!
    Attachments:
    error message 1.JPG ‏455 KB
    error message 2.JPG ‏568 KB

    I can't read the second error message, but the first one appears to be a USB connection issue.
    Have you followed the instructions on the myDAQ Setup and Support page ?
    This will tell you if the connection is working.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • Digital writer refnum error

    I am utilizing a digital writer for my particular code and for some reason if I try to attach a second digital writer to stop the output, I would receive the error in the title. I want the output to pause midway through the code and then start again before fully stopping. Is there something I can do to remedy this error. The second digital writer is placed outside of two while loops.
    Thanks

    Hello i have a set of values displayed on the front panel and i need to make those values update every 15 seconds or so i indeed have a button which upon clicking reads the values, but as i said i just need to get it done automatically, so does removing the button and adding a ( control refnum) and using a loop, will it help...please help me..
    SD4r wrote:
    I am utilizing a digital writer for my particular code and for some reason if I try to attach a second digital writer to stop the output, I would receive the error in the title. I want the output to pause midway through the code and then start again before fully stopping. Is there something I can do to remedy this error. The second digital writer is placed outside of two while loops.
    Thanks

  • How to control the data rate of a digital write to a port on a PCI-6509

    I am using a PCI-6509 to write digital words to a custom digital board. I can generate the proper patterns with the 6509 but the resulting pulse rates are very high (150+ khz) which is very noisy. I know the board cannot have its clock controlled. Is there a simple way to adjust the output rate? I am generating a 1D array and writing this to the device with the NI-DAQmx commands. About all I could come up with is interleaving this array multiple times to stretch the resulting pulse. Anything more elegant, as this seems pretty brute force?
    Thanks,
    Tom

    Hello Tom,
    When doing software-timed updates, you can use a delay function in your loop which is doing the DAQmx Write. Increasing this delay should increase the delay between every sample that is written. Because this is software-timed, it is not deterministic so the time between the samples being output might be greater than what you are actually specifying the delay. However, this is not really a disadvantage compared to the current method you are using (duplicating array values to stretch the pulse) because it is also software-timed. I hope this helps!
    Eric
    DE For Life!

  • Clearing write statements

    We are facing a problem with clearing the write statement buffer.
    Our aim is to send mail by compressing the list memory, and the mail is sent in a loop. In each loop we have different set of data to be sent. But problem here is in the mails after the first mail, the data is getting appended in the subsequent mails.
    For example,
    do 10 times.
    *****Have to clear buffer here*****
    write :/ hi.
    perform sendmail.
    enddo.
    The above code should give ten emails...with only "hi". In other words, the list output should be only one "hi" and not 10 times hi. WE have tried all possibilites to clear the write buffer, Any help in this regard is highly appreciated.

    Hi aakash,
    1. use MODIFY LINE concept,
       to modify the line number 1
       (so that line 1 is RE-WRITTEN there itself,
        instead of line 2, 3, 4,..etc)
    2. just copy paste
    3. It will give only 1 HI, in 10 loops.
    4.
    report abc.
    DATA : MSG(100) TYPE C.
    MSG = 'HI'.
    DO 10 TIMES.
      IF SY-INDEX = 1.
        WRITE :/ MSG.
      ELSE.
        MODIFY LINE 1 LINE VALUE  FROM MSG.
      ENDIF.
    ENDDO.
    regards,
    amit m.

  • Write Up Depreciation Concept needed to be Clear !

    Hi,
    All Experts ,
    Can anyone clear me the Write Up Depreciation Concept with example and scenario ?
    I am confused between normal depreciation & Write Up depreciation.
    Your help is highly appreciated.
    Thanks in advance !
    Regards,
    Pankaj.

    Hi,
    Paul.
    As you said that Write up depreciation is use to make correction in posted depreciation for earlier
    periods, then Write Up depreciation is use to make an increase or decrease in depreciation ? 
    I knew that write ups can not be posted for current period allowed to post for earlier period.
    ( Mite be wrong ! correct me. )
    Please throw a focus on it.
    Thnaks Paul.
    Regards,
    Pankaj.
    P.S :- Does posting write up generate FI Documents ?
    Edited by: pankaj_ab on Jun 16, 2009 2:22 PM

  • Making Multiple Digital Signatures Read-only in Form (Acrobat 9)

    I have created a form which includes two (2) digital signature fields.  What needs to occur with the form is Person1 fills the form and then digitally signs it thereby making the form fields read-only .  Person2 then digitally signs the form which should make Person1's digital signature read-only.
    Here's what I've done:
    1) For the Person1 digital signature field, in Digital Signature Properties, under the Signed tab, I have selected Mark as read-only <all fields except these> and selected the Person2 digital signature field.
    2) For the Person2 digital signature field, in Digital Signature Properties, under the Signed tab, I have selected Mark as read-only <all fields> since once Person2 signs the form I do not want Person1 to be able to clear the digital signature and make changes to the form.
    Here's what actually occurs:
    Step 1 above works fine.  Once the signature is applied all the form fields are read-only except for the Person2 digital signature field.
    The problem is that after Person2 digitally signs the form, even though I selected all fields as read-only, Person1 can 'clear' their signature which leaves all the form fields available for editing and leaves Person2's digital signature still on the form.
    I honestly don't care about 'validating' signatures on this form since it's going to be printed but I cannot allow Person2's signature to remain on the form and allow Person1 to edit the form.
    --Mike.

    Hi!
    I have the same problem. Have not been able to figure it out, although tried everything.
    Hope somebody can help
    - MackeMan

  • How to write to one channel of a task with multiple channels? (plus other things...)

    So I have a USB-6009 DAQ.  It has 12 digital output lines.  I want one channel that is "Dev0\line0:10" which represents an address bus in my application.  And a second channel "Dev0\line11" which represents a program enable line in my application.
    I have tried creating two different tasks and adding one channel to one task and the other channel to the other task.  The only task that worked was the task with "Dev0\line0:10".  It was always the task containing that channel, regardless of the order of creation.  So then I moved on to a different method.  (I read somewhere that I should only create one task of each type.  like only 1 DO task only 1 AO task etc...  However I am also using the two analog ouputs to and have a task for each AO and they work just fine.)
    I tried add both channels to one task.  But when I needed to control only the address bus, I had to have some information for the other channel as well.  This was a little trying, but I could configure it that way.  But it turned out to be easier for me to just make one channel with all the lines and OR in the data for line11 with each write.
    I just wondered if it was possible to write to one particular channel of a task and not the other channel?  That would really be the ideal solution for me.  especially if I could write multiple samples to the one channel while I left the other channel alone.  Which brings up another complaint... Why does WriteMultiSamplePort only work if I use a DigitalMultiChannelWriter, and not if I use a DigitalSingleChannel writer even though my task only has one channel (and by the way I set up the channel as one channel for all lines)?  A perplexing issue to be sure.
    And no I can't just load all my samples into an array and write them all at once because I also have to manipulate the two analog outputs in between the various digital writes.
    I am using NI DAQmx 7.5 and C#.  I am trying to use the DAQ to program a digital switch, which has proven to be a real challenge.  In push-pull mode there is too much ringing for the switches programming port to tolerate.  But the switches interface is LVTTL, so I needed the 3.3V.  When I changed to open-collector I had to use voltage dividers to drop down to 3.3V.  But the rise time using open-collector is too slow for me the program the switch in serial mode, so I had to change to parallel.  The switch has an 11 bit multi-plexed ADDR/DATA bus.  So the DAQ I had chosen to use which had plenty of lines for the serial programming, now is strained to it's absolute limits by the parrallel interface.   ARGH.  The only output I am not currently using is the counter, and I'm going to need it if I ever want to read back from the switch.  But first I have to seperate the ADDR/DATA bus from the CS line on the DIO lines of the DAQ.  And I don't know for sure what I'm going to do about the voltage level translation when I have to go bi-directional.  Maybe I can filter out the ringing in push-pull mode?  Any thoughts on that?

    Hi Saikey,
    In most cases, you are exactly right: you can only use one task for one type of operation (i.e. only one analog input task in the same program). With the USB 6009, you can have multiple digital output tasks running at the same time. I was able to run a digital output program with two different digital output tasks configured for a USB-6009.
    However, you stated that it would be better if you had everything in a single task for your application and write data to only some of the channels. The easiest way to do this is to modify your array of output data so that only the data to that one channel is changing. So, for example, if you keep writing a 0 to the channels that do not need new data nothing will change.
    If you have to change your analog outputs during this program, you could create an event structure that would stop and restart the analog output tasks without changing the digital output data. I hope that you find this information helpful.
    Regards,
    Hal L.

  • Need to write a procedure for Log files (scheduled jobs)

    Hi,
    We have around 50 scheduled jobs.Jobs will run parallelly. In these jobs, some jobs will repeat at different timings.in these some jobs are daily jobs and some are weekly and some are monthly and some will run first and second working day of the month and some will run on some particular days.
    Now I want to write a procedure like, For every job it should create a log file like "
    <Job_Name> started on <Date> at <start_Time(timestamp)> and completed on <Date> at <End_Time(Timestamp)> successfully.
    <Job_Name> started on <Date> at <start_Time(timestamp)> and completed on <Date> at <End_Time(Timestamp)> abnormally.
    If all jobs complted successfully it should send an email to the mailgroup with attached log file (which contains the details of all the jobs) with format as follows.
    Jobname Start_date Start_time End_Date End_Time Status
    SALES 21-May-2011 12:00:00 21-May-2011 12:01:00 Completed Successfully
    21-May-2011 12:15:00 21-May-2011 12:16:00 Completed successfully
    Proudcts 21-May-2011 23:00:00 21-May-2011 23:16:00 Completed successfully
    ITEMS 21-May-2011 23:00:00 21-May-2011 23:16:00 Completed successfully
    If the status ="Completed abnormally" for any particular job
    immediately it should send an mail to the group like " FATAL_MESG_JOBANAME_Date_Time(timestamp)"
    for example if SALES job was failed at 15:00:00 then immediately it should send a mail.
    if ITEMS got failed then it should mail ( in between any job got failed it should send an email).
    if every thing is going cool then need send a final success mail to the group.
    so Please let me know how to write a program for this requiremnt.
    Thanks in advance.

    832581 wrote:
    Hi,
    Thanks for giving valuable link to gain the knowledge on DBMS_SCHEDULER.
    But here I didn't get clear idea to write a program which I need to schedule the job for every 1hr.
    Please suggest me to write the program..
    ThanksYou'll have to read the link i sent. Or google for an example.

  • Partial data clear in ASO possible for multiple tuples?

    Hi,
    I am trying to do a partial data clear in an ASO cube. I need to clear FY12->Oct & FY13->Nov (consecutive periods). Here's what I tried:
    +alter database 'GL_TXT'.'GL_TXT' clear data in region '{([FY12],[Oct]),([FY13],[Nov])}' physical;+
    No error is thrown but the data isn't cleared either. The statement finishes execution almost immediately.
    I tried the UNION function but that didn't work either. Here's how my statement looks with the UNION function:
    +alter database 'GL_TXT'.'GL_TXT' clear data in region '{UNION({([FY12],[Oct])},{([FY13],[Nov])})}' physical;+
    Again, no error but no clear either. The UNION pulls the correct data set when used in a Select statement:
    +SELECT UNION({([FY12],[Oct])},{([FY13],[Nov])}) ON COLUMNS FROM GL_TXT.GL_TXT;+
    I can get it to clear if I write separate statements for each period but I want to have them in a single script as I suspect two scripts wouldn't be very efficient.
    Please help!
    Thanks,
    Shashi

    Thanks for your reply Vasavya! Running the region clear scripts twice (once for each month) is still faster for me than using the report script approach. I want to see if having both periods in one statement will improve the performance :)
    Regards,
    Shashi

  • Digital Signatures/Javascript After Signing?

    Hello everyone,
    I'm currently developing forms for my company, post processed through Adobe Acrobat 9 Standard, that require digital signatures. Working in the food industry requires compliance to specific FDA guidelines, specifically CFR 21 part 11. In order to meet the requirements I must develop an SOP (Standard Operating Procedure) that proves signatures are accurate and secure.
    The process is tedious, and I have called a few meetings thus far to discuss some of the unforseen circumstances. During the discussion a question was brought up stating; What protects forms stored in the archives (3 years for compliance) from being corrupted by a disgruntled employee? Specifically, what stops an employee from clearing a digital signature? I realize we can set up file access rights to the forms to prevent such happenings, but majority of the forms are setup to hold 6 months to a year of info, thus wouldn't be archived until filled completely.
    My question: Does anyone out there know of a javascript or trick to disable the "Clear Signature" function after signed? I've been searching and have turned up empty handed. Also, does anyone have any other javascripts that are used after digital signature occurs?
    Thanks in advance for any help you can give me,

    George,
    Thanks for your response.
    The issue is not if the file is deleted, the issue is if the files becomes "manipulated". I think "corrupted" was the wrong choice of words.
    To explain: Any form that is completed has several digital signatures within the contents, depending on which QA Technicians complete the task (e.g. Calibrations, Metal Detector Settings, etc...). Forms are setup by days, weeks, or in some cases years, and have designated signature areas for the time period the test was conducted. So, after "John Smith" completes his portion of the form he is required to digital sign the document, after signing is complete all information is set to read only and cannot be altered unless the signature is deleted.
    Digital signatures can be deleted in two ways:
    1. The user who signed the document, based on active directory, has the ability to "clear signature". As and FYI: no other user is capable of deleting a signature signed by another employee. (does not apply to the form author)
    2. The file creator can add a "Reset button" control, thus being able to delete any data specified.
    So as I said I'm looking for a way to lock all signature functions, after sign is completed, even for the original signer. So if form "Calibration01" is currently being filled out and has signatures x,y,and z on it; I want to make sure if "x" is disgruntled they do not maliciously go and clear their signature. Also, I would like all fields associated with the signature to be locked without any way for the user to manipulate or revise data.
    If anyone has any javascripts that run once signer digitally signs, it would be a great help,
    Thanks,

  • Digital Signatures- either disable reader abilities or  any other work around

    I am fairly new to acrobat
    I have designed a form that uses a JavaScript that looks at individual fields to verify if the information is good. I also require two signatures along with these correctly entered fields before I consider the form "good to go"
    (If the form is missing something, my form validation JavaScript will population the value of a text box with the list of which fields are bad.  The warning goes away when everything is good)
    I can’t find the correct property in JavaScript that reference if the digital signature field is signed or not, so I put in the signed event JavaScript that locks the field when signed.
    In my form validation script, I check to see if that digital signature field is locked- if so- then they must have signed it.
    Here is where I am running into trouble:
    After rights are extended to reader (my users will use reader to fill out this pdf)
    It’s possible for the user to sign it, (locking the field) and then clear the digital signature (but the locked field tells my validation script its “okay”)
    Locking the field does not stop someone from clearing it, which is not good.
    Also, someone using reader can add a digital signature on top of where I want them to sign it- and my validation script doesn’t know about this, so it won’t remove the warning if they add their own signature.
    How do I:
    ((Find the javascript property to know if a particular digital signature field is signed.)
    OR
    (Find a way to not allow the user to clear their signed signature))
    AND
    (Stop the user from adding their own digital signature field to the form?)
    Thank you.

    One last try.
    You help would really be welcome in finding out the root cause of the difference in behaviour between reader 8 and 9 in this matter (bug or change).
    I have no idea what documentation to read (since i've read the launch documentation and change list documentation) about reader 9, i've contacted Adobe 3 days ago (and the answer is silence, like usuall) and have no clear thought about what to say (without taking a huge risk by giving a uninformed answer) about this issue.
    Thanks.

Maybe you are looking for

  • JList in Wizard works only once?

    Hi All, Here's my problem. I'm creating a wizard to do some file manipulation. It has all the usual features of a wizard, (Next, Back, Cancel Buttons etc.). One of the panels in the wizard has a JList component (in a scrollPane). Now basically I have

  • Moving Specific folders

    Please help, i just starting using automator today and I'm struggling. I'm tryinig to copy a folder using 'copy finder items' but I can't convince automator i just want to copy that specific folder and not all folders and files I've been previously w

  • Problems with the X-Fi Xtreme Audio Notebook external card..

    I recently updated my drivers for this card on my laptop to find out that updating my drivers meant causing my card to stop working. Before I decided to update through vista (probably a bad idea, but I really was hoping to get my new headset to work

  • How to implement H323 based VCS behind PIX 6.3

    There are some articles talking about issue with H323 traffic passing through firewall.I have a client will deploy Polycom endpoint behind PIX 6.3,my question are 1. Should I do no-NAT or regular Static (inside,outside)? I saw some threads talking H3

  • Afrikaans input language

    When can we expect afrkaans as an input language?