How do I calculate 'uptime' of a digital output

Hi everybody,
I'm new to these forums and I am currently evaluating Labview for a series of lab tests where we measure energy balance in a chemical reaction. I've already 
I have a USB 6008 wired to a relay drive (thanks to these forums) and a heating element and I want to measure the total time heating element is 'on' during 24 hours to calculate the energy the system is getting. The heating element switches on and off based on the signal of a thermocouple.  Is there an easy way to measure the seconds that the output port wire to the heating element is active? Device-independent would be preferable (like measuring the signal uptime of the input of the digital output of the USB6008)
I tried a lot of options today, like while loops, sequences, case structures following several postings here but all of them failed miserably - while the problem sounds so easy. I could easily do it in the hardware by wiring the output of the relay drive to a bauser timer, but that would be giving up too soon
Any help would be appreciated.
Best regards,
Dimitri

Hi Dimitri,
Welcome to the NI Forums! It's good to hear that you've already received some help here.
Q: Is there an easy way to measure the seconds that the output port wire to the heating element is active? 
A: Yes! The method we can use to perform this action depends on the sort of architecture that you're using at the moment, however we can take advantage of the section of your code which defines whether the line should be on or off. When it's on, using a While Loop we can  use a Timestamp to keep track of the current System clock; this Timestamp will update on every loop iteration. If we use a reference Timestamp which is created outside of the While Loop when we first begin to drive the line high, we can simply work out the difference between the current Timestamp and the reference Timestamp to get the total time.
This kind of code will also be device independant because it relies only on the computer it is used on.
I hope this helps!
Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Similar Messages

  • How to give delay in switch on digital output lines

    Hello All,
    I am working on PCI-6514 Digital IO card, I am writing a sequence to my application using DAQmax for  Digital input and output lines
    I want to switch on one output line0 and after a delay 5sec switch on line1 output and after a delay of 3sec switch on line2 output and sense input line 0 and line 1 .
    How can we know the status of output ie output is on or off.
    Since i am using the IO card for first time suggest me in this.

    Hi
    I am going to assume that you are using LabVIEW 7.1 for this application.  If you are trying to acquire data from an external device after outputting data to that device, the DAQmx tristate property node will give you this functionality.
    You will then need a DAQmx write.vi to output your digital data followed by a DAQmx channel property node. Select Digital Output>>Tristate on the property node and wire a true constant into it. After the property node, you can use a DAQmx read.vi to read the data coming into the digital lines. By using the tristate property node, you can avoid stopping the digital output task and starting an entirely new task.  I am attaching an example program that will demonstrate this.
    Regards,
    Hal L.
    Attachments:
    digital input and output.vi ‏39 KB

  • Simple digital output

    How can i use counter as simple digital output(On, OFF) for 6602?
    I want to use counter output (PFI_32) as simple On/Off output, because in the future
    I want to change my application to pulse generation.

    Hi,
    An example of writing to a digital output line can be found at:
    C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC\Do\DOoneline.C
    As in the LabVIEW example, you will have to set the line to number 28. Program is hardcoded to use
    DIO_28 of TIO board. DIO_28 is pin 32.
    I hope this helps, and have a Great Day!
    George

  • How to Display CSM Uptime

    I have done this in the past but I cannot find it anywhere......how do you display the uptime of a CSM module in a 6500? The chassis has an uptime of over 2 years, but I believe the CSM module was power cycled at some point within that 2 years and I need to find out if we may be running in to the bug that occurs after 828days of uptime. We are running 4.2(6) on the CSM and 12.2(18)SXF1 IOS on the SUP.
    Thanks....Jeff

    The CSM calculates uptime in a very different manner, it utilizes "ticks" which is a cpu cycling that occurs about every .81 seconds.
    To get this... issue a show tech for the CSM "show mod csm tech-support all | b SESSION" or look for the "Current time" under session statistics.
    You will find something like this:
    --------------------- SESSION Statistics ---------------------
    Current time                             88478025   20073041   1
    Take the number on the far left (the total time) and multiply it by .81, then devide that by 86400 which will give you days of uptime.
    Ex using the above values.
    88478025 * .81 / 86400 = 829 days of uptime.
    Regards,
    Chris Higgins

  • How do I use a push button digital trigger with my 6034E DAQ board?

    I am only a Lab View toddler.
    I am currently using a push button, wired to PFIO/TRIG1 and DGND, with a anolog trigger. However noise is causing my program to be triggered. I was told that a digital trigger would help to reduce the random triggering. How do I create a push button digital trigger?
    Thanks

    implement a schmitt trigger.
    Struggling with Labview wrote in message
    <[email protected]>...
    >I am only a Lab View toddler.
    >I am currently using a push button, wired to PFIO/TRIG1 and DGND, with
    >a anolog trigger. However noise is causing my program to be triggered.
    >I was told that a digital trigger would help to reduce the random
    >triggering. How do I create a push button digital trigger?
    >Thanks

  • How do I use the counter and digital signals of the 6071E while it is connected to SCXI modules?

    I am contemplating using a PCI 6071E with SCXI. We have the boards (6071E), we would need the cable (I suppose SH1006868) and the SCXI system. I would like to know how would you access the counter and digital line capabilities of the board. I will be using a SCXI-1314 with a SCXI-1520 Module for strain measurements but will need to use the counter and digital lines of the board as well. Can this be done? If so, how and/or what else do I need?

    I think this KnowledgeBase will answer the question for you.
    Accessing DAQ Board Counter Pins with an SCXI System
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • How can i calculate tempsize and logdir size ?

    Hello:
    I have one database on a primary server and its replica on a replica server.
    Since one week to now, Mexican Exchange have had a considerable growth on transactions.
    My database works in line, every night all data is cleaned waiting for new data on next day.
    From last Thursday (29 april 2010) my replicas have had problems on drop all data using delete from.
    I use delete from because those tables are Oracle cache groups defined.
    Looking for error on tterrors logs (yesterday I got this error) I could see that replica was ran out of temporal memory.
    On line database and replica database I have defined same temporal memory size, on this case 512Mb. But primary database did not send any error about this parameter, so if I checked “monitor” columns on database, my temp_in_use size is too less than temp_allocate_size.
    My problem is, how can I calculate temp_allocate_size ?
    So I have had close to 3,000,000 record on a simple table, I mean, I could have 2 or 3 tables with same number of rows.
    If I have this parameter (may be 9,000,000) rows to be deleted, is there any way to calculate temp_allocate_size ?
    But now, I suppose that I need enogh space on “LogDir”, my high_water_mark for permanent memory is 10GB, I have defined 16 gb for LogDir, but if I stopped replication since the operation starts, I had 100% space used at middle of my operation, so 5Gb on real database used, it is using close to 16 gb on LogDir.
    My second doubt … is there any way to calculate LogDir size having the maximum database size ??
    Thanks a lot for your help.
    Regards.

    I think that approaching this from the perspective of increasing temporary space and log space is not the best way.
    Firstly, there are better ways to delete all rows from a table instead of using delete...
    1. For regular tables (ones that are not part of a cache group) you can use TRUNCATE TABLE ... This operation is replicated but the voilume of replicated data is vastly smaller than if you delete all rows individually. Also, it should take a lot less Temp space on both the source and target system.
    2. For cache tables, you could use UNLOAD CACHE GROUP ... This is similar to TRUNCATE but for cache tables. Again, this operation is replicated. Note that if you are using AWT or SWT cache groups and you DELETE in TimesTen then the data is also deleted from Oracle... is that wjhat is desired?
    If you have to use DELETE then it is very important that you delete the rows in small batches rather than as one huge transaction. Trying to replicate a delete of 3M rows will cause huge problems for replication. A much better solution is to delete in smaller batches using some application logic as follows:
    loop:
    commit;
    DELETE FIRST 1000 FROM sometable;
    If rowcount > 0 then goto loop;
    commit;
    This approach has 5 benefits:
    1. Much less Temp space will be needed.
    2. Replication will be able to process the delets as they occur rather than waiting until all 3M rows have been deleted and then trying to tepliate a single transaction of 3M deletes. This will greatly improve replication performance and also prevent excessive log file buildup.
    3. Checkpointing will be able to purge log files as the delete progresses rather than having to wait until all rowsw have been deleted. This will prevent excessive log file buildup.
    4. The overall time required will be much reduced compared to deleting all rows in a single delete.
    You should not stop replication while the delete s are being done as this just causes log file accumulation.
    To answer your original question. it is not possible ot 'calculate' the required temp space pof log space; rather one must use observed data from when the system is running to determine the necessary size. For Temp size, you can look at the Temp high water mark to see the maximum space used and then set TempSize to somewhat more than that value. For log space, you need enough to sustain the maximum amount of log data generated with some contingency. Running our of log space is a very bad idea...
    If you adopt my suggestions above then you can avoid these issues and also complete the cleanup of data in a shorter time.
    Chris

  • How do I calculate the total size of selected folders?

    Hello
    My question is:
    How do I calculate the total size of selected folders?
    Thank you

    It does show the aggregate size.
    Command-Option-I opens the Inspector window. (Or open the File menu and hold the Option key. Get Info turns into Show Inspector.) The Inspector is similar to the Get Info window but it shows aggregate info for multiple selections. It is also dynamic — if you change the selection while the Inspector is open, the info changes to reflect the current selection.

  • How can we calculate no.of leave used by the employee except sunday.

    Dear Friends,
    i have query how can we calculate no.of leave taken by the employee except sunday & government holiday.
    Example: A person take a sick leave From 13/02/2008 to 20/02/2008 with in that period 17th was sunday.
    when we calculate absence day for that person,Total value is 8 days but exact output is 7days only.How can i get exact result,any function module is avilable for this issue .
    Thanks & Regards,
    Rajkumar.A

    Hi,
    you have to consider SL leave as in holiday's So you can check with clinet if client says consider you can otherwise you con't
    its depend client requirement
    and you can go to controlls inSAP and change absence controlls for SL with holidays
    Regards
    Suresh

  • How can we calculate no. of instances in a java program ?

    Hi,
    I want to know that
    How can we calculate no. of instances in a java program ?
    Actually I just want to calculate number of live instances in a program at any time...
    Thanx in Advance
    Vijay

    Been asked a few times in this forum.
    Try having a search.
    One way, in brief, is to instrument your classes so that constructors update a per-type counter, and enqueue a PhantomReference for the instance.
    When you pop from an associated ReferenceQueue, decrement the counter for the no longer reachable type.
    Once you have this, you can query instance counts per type, or globably etc.
    We maintain a model which can be remotely queried - and display results over time using JGraph. Gives a fairly non-intrusive way to spot and narrow down the cause of memory leaks in a large application.

  • How do you calculate the count in before a cue start?

    Here's what I can't figure out.
    I have a quicktime loaded and I need to start a cue at, let's say, 1:05:07:10. I want the tempo to be, oh, 120. I arbitrarily say - this will be measure 41 but it doesn't really matter, I just need my downbeat at that TC and the tempo to be correct.
    So far so good. I have no problem doing this with Tempo operations. I lock the time code, assign it a measure (in this case 41) and have logic calculate a single tempo from 1:00:00:00 (measure 1) to the desired start.
    Now here's my real question. How do I calculate 4 or 8 beats before 1:05:07:10 so I can have a count it at the correct tempo (120)?
    So I'm wonder how some of y'all handle this situation.
    Thanks

    As long as you are in the Fetch call, all other calls to the Scope
    driver will block until Fetch exits.  That's why the Abort doesn't
    do anything.  You have two options:
      1) Use a finite timeout.  Obviously, you are running into
    cases in which the trigger does not arrive, and want to exit
    cleanly.  This is exactly what the timeout is for.
      2) Determine the acquisition state before calling fetch. 
    If this is a finite, single-record acquisition, poll on acquisition
    status and do not call fetch until the status is 1 (acquisition
    complete).  If you're doing a finite, multi-record acquisition,
    poll on the Fetch>>Records Done property and only fetch the
    records that have completed.  If you're doing a continuous
    acquisition, poll on the Fetch>>Points Done or Fetch>>Fetch
    Backlog property and only fetch the number of points that have been
    acquired.
    There's no clean way to break the infinite timeout fetch without forcing LabVIEW to close.

  • How do I keep a digital output from SCC DO01 from fluctuating states?

    Background: Hooking an ohm-meter across a digital output from a SCC DO01 isolated optical switch shows that the resistance fluctuates and at times goes open circuit. It appears directly related to the LabView code where I'm writing to this digital line within a WHILE loop. The loop has a variety of other operations going on. These other operations, I believe, are causing this problem due to timing or something.
    How can I improve the reliability of this digital output? There must be some method of establishing priority within a WHILE loop.
    Really appreciate the help.
    Hunter

    Howdy, Justin
    Thanks for your reply.
    I've actually been connecting the meter across Vss and Vout. Actuating the digital output, I can see the state of the switch. Attached is the VI which involves this DO01, specifically, it's associated with the VFD RUN/STOP.
    Since I sent this question out, I've actually gotten some help from Andy Watchorn of NI. This switch holds state much better.
    All the best,
    Hunter
    Attachments:
    VFD_ControlVIs.zip ‏120 KB

  • How do we calculate Accumulated Depreciation for a Particular Period

    Dear Members,
    How do we calculate the Accumulated Depreciation for a particular asset. It would be great if some body can explain me ,what tables should we use.
    I read that Accumulated Depreciation is nothing but deprn_reserve column in fa_deprn_summary table. I have to make a report which should show the accumulated depreciation for an asset by period name. (eg : For MAY-07 the report should give the accumulated depreciation for that asset).
    Please give your suggestions.
    Thanks
    sandeep

    Hi,
    You can use DEPRN_RESERVE from fa_deprn_summary to get accumulated deprn. Make sure you select the latest row from fa_deprn_summary for a particular period.
    Use FA_DEPRN_PERIODS to join with period_counter if you wnat to use Period Name as criteria.
    Cheers
    Sunil Chawla

  • How to generate multiple digital outputs (square waves delayed) at 50 kHz?

    I would like to generate 3 digital outputs like the picture attached at 50 kHz. Using the "digital pattern generator (marching values).vi", I can generate 3 digital square wave but without the delay time. How can I do that?
    I'm using the card PCI 6034E.
    Thank you
    Attachments:
    digital outputs delayed.png ‏8 KB

    Hi,
    the digital pattern generator (marching values) only shifts the binary value of the first signal and sample to the next signal/sample.
    Have you tried generating your waveforms via build waveform and use t0 terminal to change the lead delay?
    In general, this DAQmx example could be helpful which you can modify to your needs.
    DAQmx Write Digital Channel- External Clock: https://decibel.ni.com/content/docs/DOC-11142
    Regards,
    Thomas

  • How to do a digital output triggered by the falling edge of a clock?

    Hello !
    I would like to do a digital output (on a given line of a pci 6602 card) triggered by the falling edge of a clock.
    More precisely, a pulse train is generated. I have to output each bit of a variable (first, the LSB ; then, the others bits, until the MSB), each bit being transfered on a falling edge of the pulse train. How could I do that, please ?
    Thank you for helping me.
    Julian.

    see the following link (other forum same subject)
    http://forums.ni.com/ni/board/message?board.id=40&message.id=1634

Maybe you are looking for

  • I got a new computer and want to transfer PHOTOS Is this possible?

    I'v got all the photos from my old computer onto my ipod but now when I plug it into my new computer, it tells me that i can not sync 2 librarys and I have to delete the stuff on the ipod to update....does anyone know a way around this? Is it even po

  • Error in file name encoding on OS X

    This little java program fails when creating a new file with the Danish letter "�" (U+00C5) and then trying to find the same file. It cannot find it - the name has been messed up in the encoding/decoding. The program only fails on OS X 10.4. The char

  • Changing an entire column... Updating a price list bay 10%.. How?

    I've imported an excel spread sheet, with a companies price list.. Now that Ive converted it to Numbers, I would like to update the prices by multiplying the column values by a certain amount.. How do I do this?

  • How to create soap envelope structure

    Hello Friends, I am working on a RFC to webservice sync scenario.Here I am getting response from webservice in soap envelope form which is not matching with my wsdl response structure. I have tried to create the envelope structure manually  but i din

  • PE 10 Archive not trimming clips

    From the PE 10 Help manual "Archive Project - Creates a folder containing a new project file, and a new clip for each clip used in the original Timeline or Sceneline at its edited length. The trimmed project includes up to 30 frames of extra footage,