Labview code to trigger and scan spectra from HR4000 spectrometer?

has anyone used labview code to trigger and scan spectra from HR4000 spectrometer? When I use one of the device drivers (Spectral Acquisition.vi), i miss lots of trigger when I run it for more than 100 iterations?
I was wandering if anyone is working with it or had in the past and if you could share your insight.
Thanks

Inconsistent times are one thing, overall slowing down is another, although they may have common source. I guess it is the XY plot in your case. Do you have it AutoScaled? If so, try turning autoscaling of both axes off.
Secondly, I don't quite understand the reason for the inner loop with number of iterations = constant 1. What happens if you remove the loop? I understand you want to change the number of iterations in future, but let's test the simplest things first. Removal will require indexing the Wavelength array explicitly with an apropriate block. By the way, it is customary that you EITHER define the number of iterations of a FOR loop by connecting the N input OR by indexing of an input array - NEVER both at the same time. Maybe, changing the multiple XY plot into a single XY plot won't be necessary, maybe it will, try for yourself.
Thirdly, I suggest you try enclosing the XY plot block alone in a case structure (say, in its TRUE window) and set the true condition to occur at some fraction of the total iterations, not every cycle. You do this using the index "i" of the main iteration loop, calculate modulo something (e.g. 10) and test if it is true or false. This way you update the XY plot every 10th iteration only and by choosing different modulo divider you can test, if the plot's display is or isn't the beast slowing things down.
Finally, I suspect it is not necessary to use a Local Variable of the seconds 2 indicator. How about simply wiring the output of your To-double block to the input of the subtraction block? That should let you remove seconds 2 local variable with no harm done.
Daniel

Similar Messages

  • How to failover SCAN VIP and SCAN Listener from one node to another?

    Environment:
    O.S :          HP-UX  B.11.31 U ia64
    RDBMS:   Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    It is a 2 Node RAC.
    Question:
    How to failover the SCAN VIP and SCAN LISTENER running on node 1 to node 2?
    What is the relation between standard LISTENER and SCAN LISTENER ?
    Why do we need LISTENER, when we have SCAN LISTENER ?
    When I tried with SRCVTL STOP LISTENER , I thought the SCAN LISTENER adn SCAN IP will failover, but it did not?
    Also please clarify if I use SRVCTL RELOCATE SCAN -i 1 -n Node1
    Actalluy I am trying that by moving the SCAN listeners so that when I do PSU 7 patching on 1 node, no incoming attempt to connect will spawn
    a process and thereby opening files in $ORACLE_HOME (which would prevent the patch from occurring)
    Please clarify my queries.
    Thanks,  Sivaprasad.S

    Hi Sivaprasad,
    1. The following link will help you for SCAN VIP and SCAN LISTENER failover from 1 node to another.
    http://heliosguneserol.wordpress.com/2012/10/19/how-to-relocate-scan_listener-from-one-node-to-another-node-on-rac-system/
    http://oracledbabay.blogspot.co.uk/2013/05/steps-to-change-scan-ip-address-in.html
    2. The Standard LISTENER is specific for particular node for which it is running. It cannot be relocated as its specific for the node its running. SCAN listeners are not replacements for the node listeners.A new set of cluster processes called scan listeners will run on three nodes in a cluster (or all nodes if there are less than 3).  If you have more than three nodes, regardless of the number of nodes you have, there will be at most three scan listeners. So no relation for standard LISTENER and SCAN LISTENER.
    3. Hmmm. let me put it in easy way for this question. All the RAC services like, asm, db , services, nodeapps registers with this SCAN_LISTENER. So if any of these services (asm, db , services, nodeapps) got down/not running, the SCAN_LISTENER will know the down status, and if any client requests to access the node/service which is down, the SCAN_LISTENER will redirect the client request to the least loaded node. So here all these process will happen without the knowledge of client. And As usual the standard LISTENER looks only for incoming request to connect with the database. So we need both LISTENER and SCAN LISTENER.
    4. If you provide SRCVTL STOP LISTENER,  it stops the default listener on the specified node_name, or the listeners represented in a given list of listener names, that are registered with Oracle Clusterware on the given node. No failover will happen under this case.
    5. Yes you can relocate if you want to relocate the scan.
    Hope this helps!!
    Regards,
    Pradeep. V

  • Is possible compile .asm code to hex code?? and read&program from lb pic16f84 serial port??

    Hi,
    I would like to use my aplication, i use a pic 16f84, in my vi application i modify the asm code, and save it. LAter i need to use mplab to compile to hex and use icprog to pass to the pic by serial port...
    Is possible do all on labview???.
    Or maybe call the mplab directly to open and convert to hex file, and later call the icprog to program the pic.. without use this programs. Directly with commands do it and close the programs...
    I hope any help..!
    Regards, Fonsi.

    Fonsi,
    You certainly could write an assembler for the pic code in LV. I wrote an assembler for the old 6502 processor in LV4. The project got cancelled before everything was finished, but the concept is valid. It is a lot of work, parsing strings and tracking all the addressing modes, etc.
    Whether it is worth the trouble as opposed to using the existing tools is something you will have to decide.
    If the other software can be called from a command line, the system Exe.VI might be useful.
    Lynn

  • Trigger and Functions

    Hi All,
    I am new to PL/SQL. In my projeect i came thru a requirement.
    My table has a column called time and the type of column is char(4).
    data will look like 1100. The new table has time as char(5), Now i want to write a trigger for each row inserted to change time col data to 11:00
    for that i wrote a trigger and function. The function compiled well, i get errors compiling trigger.
    Here is the code for trigger and the function. Any help is appriciated. any code that will meet my requirements is helpfull.
    create or replace TRIGGER "PACER"."TimeTrigger"
    AFTER INSERT
    ON PACER.TIMETEST2
    BEGIN
    UPDATE TimeTrigger
         SET TIME1 = ChangeTime(TIME1);
         SET TIME2 = ChangeTime(TIME2);
    END;
    Error(9,2): PL/SQL: SQL Statement ignored
    Error(9,6): PL/SQL: ORA-00922: missing or invalid option
    create or replace FUNCTION ChangeTime(ChTime VarChar2) RETURN Varchar2 IS
         Len NUMBER;
         ChHours CHAR(2);
         ChMinutes CHAR(2);
         ChSec CHAR(2);
         ChColun CHAR(1);
         ChTimeFormat CHAR(5);
    BEGIN
         Len := LENGTH(ChTime);
         ChColun := ':';
         IF Len = 4 THEN
              ChHours := SUBSTR(ChTime,1,2);
              ChMinutes := SUBSTR(ChTime,3,4);
              ChTimeFormat := ChHours||ChColun||ChMinutes;
         END IF;
         RETURN ChTimeFormat;
    END ChangeTime;
    Thanks.

    Hi,
    Here's something you can try. It should give you ideas.
    CREATE TABLE     table_x
    (     empno          NUMBER
    ,     ename          VARCHAR2 (10)
    ,     status_cd     VARCHAR2 (1)
    CREATE TABLE     table_y
    (     id          NUMBER
    ,     name          VARCHAR2 (15)
    ,     status_cd     VARCHAR2 (1)
    CREATE OR REPLACE TRIGGER     table_x_aiu
    AFTER INSERT OR UPDATE ON     table_x
    FOR EACH ROW
    BEGIN
    --     This trigger keeps a copy of table_x's
    --     empno, ename and status_cd columns in table_y's
    --     id,    name  and status_cd columns.
    --     The strings in table_x be any combination of UPPER
    --     and lower case, but the copies in table_y are always
    --     UPPER.
         MERGE INTO     table_y     y
         USING     (
              SELECT     :NEW.empno          AS empno
              ,     UPPER (:NEW.ename)     AS ename
              ,     UPPER (:NEW.status_cd)     AS status_cd
              FROM     dual
              )          x
         ON     (x.empno = y.id)
         WHEN MATCHED          THEN
         UPDATE     SET     y.name          = x.ename
              ,     y.status_cd     = x.status_cd
         WHEN NOT MATCHED     THEN
         INSERT     (y.id,          y.name,          y.status_cd)
         VALUES     (x.empno,     x.ename,     x.status_cd);
    END     table_x_aiu;
    SHOW ERRORS
    PROMPT  ***** Testing INSERT  *****
    INSERT INTO table_x (empno, ename, status_cd) VALUES (1, 'Agatha',     'A');
    INSERT INTO table_x (empno, ename, status_cd) VALUES (2, 'Lucy',     'b');
    PROMPT     ***** table_y should have two rows  *****
    SELECT     *
    FROM     table_y
    ORDER BY     id;
    PROMPT  ***** Testing UPDATE  *****
    UPDATE     table_x
    SET     ename     = 'Agnes'
    WHERE     empno     = 1;
    PROMPT     ***** ID=1 should have name='AGNES' and status_cd='A'  *****
    SELECT     *
    FROM     table_y
    ORDER BY     id;The names I give to triggers are usually similar to, but not exactly the same as, the name of the table to which they are attached. The last part of the trigger name, "_aiu", is a reminder that this trigger fires After Insert or Update.
    Avoid using double-quotes when naming things.

  • Can/t scan documents from HP OJ 6500A plus

    Ever since I installed McAfee, I can no longer scan a document from my HP 6500A Plus to my Dell Inspiron desktop computer.  I keep getting the message "Scanner communication cannot be establisheed".

    Hi Greg42,
    Thank you for getting back to me again. If the printing is also showing issues, such as the slow printing, it's possible the printer itself could be at fault.
    I'd suggest loading about 10 blank pages and make 10 blank copies to test out the hardware without involving the computer in any way. If the copies show problems, the printer has an issue.
    If you find that the copies are working fine, run the Print and Scan Doctor from your computer to fix or detect printing and scanning problems. You can save this tool right to your desktop and run it twice (and when needed in the future) for printing and scanning.
    Let me know how you make out thus far and we'll go from there.
    Cheers,
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Fax and Scan on Server 2008 Terminal Server

    Summary: Fax and Scan does not appear in the start menu on a terminal server with desktop experience installed.  Any ideas why? 
    I am running Windows Server 2008 Enterprise as  terminal server for about a dozen users.  I would like to enable them to use the fax server capability of our Windows SBS 2003 server.  From what I can tell, they can access the fax server using the Fax and Scan software on server 2008.  All of the documentation I've read says that when I enable the "Windows Desktop Experience" feature on Server 2008, the Fax and Scan software should appear in the Start Menu.  It's not there.  I have un-installed and re-installed Desktop Experience, but still no Fax and Scan.  From what I can see in the documentation, I don't need to install the fax server role to get the software, just the desktop experience feature.
    Is is possible that fax and scan and/or other features of desktop experience are disabled when terminal services are enabled?  Is there something else I'm missing?
    Thanks,
    Lee

     
    Hi,
    According to your description, I suspect that you may misunderstand “Desktop Experience” and “Windows Fax and Scan”.
    Based on my research, if you want to use Fax and Scan services on Windows Server 2008, you should install the Fax Server role from Server Manager first.(For instructions, see Install the Fax Server Role. http://technet.microsoft.com/en-us/library/cc771198.aspx)
    After you installing the Fax Server Role, the Windows Fax and Scan item will appear in the Start Menu(Start\All Programs\Windows Fax and Scan).
    The Desktop Experience includes most of applications and features that are provided in the Windows Vista. Users who are using computers running Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate, and Windows Server 2008 can send a fax using the Windows Fax and Scan feature—either using a fax device attached locally or a fax server. To access this feature on Windows Server 2008, you must install Desktop Experience, which is available from Server Manager.
    You may refer to the following the steps to install Desktop Experience:
    1. Open Server Manager: click Start, point to Administrative Tools, and click Server Manager.
    2. In the Features Summary section, click Add features.
    3. Select the Desktop Experience check box, and then click Next. and then click Install
    Hope this is helpful.
    Nick Gu - MSFT

  • How do I subtract the shape of a layer (a scanned shape) from my other layers - but when the shape hasn't been drawn in photoshop

    Im trying to subtract a shape I have previously painted and scanned in from my other layers...can this be done?

    If this is the effect you want, add a white bottom layer, and create a mask of the heart art to drop it out of image layers
    or... do  you want color only in the heat shape and the rest of the page white?

  • 2.0 Starter Edition Cannot Load Videos and Scanned Photos?

    We are using the Stater Edition 2.0 and has been working great, but we now can only retrieve photos, not videos and scanned photos from the camera since taking the HP to a computer geek.
    Using the browse settings for camera/card reader what do I need to change?.  Currently the path is c:\documents and settings\allusers\startmenu\programs\my documents\my pictures\adobe\digital camera photos.  This path works fine from our powershot pro1 camera for photos and we need help to retrieve videos and scanned photos from this camera. HELP!

    cars,
    I think there is a terminology issue with how you phrased your question, so I don't understand the issue.
    You say the path has changed, and therefore you cannot copy files into Starter Edition. That is not how you use Starter Edition.
    To add an item to Starter Edition, you click File>Add>Folders, and point to wherever the files are located. If you are having trouble locating the files that you want to add to Starter Edition, that is not something that can be fixed in Starter Edition; you need to know how to traverse your file system using Explorer, to locate the files that you want to add.
    If, on the other hand, you are able to navigate to the folder where the assets are that you want to add, and you are unable to see them, it could be that they are in a format that Starter Edition cannot support; what are the file extensions?
    -Mark

  • PDF Report generation and email it from a DB trigger

    Dear all
    Is it possible to run a report in PDF format ad email it to some clients after a specific envent through Database Trigger. For example whenever a client makes an entry into order entry table (through entry form), a trigger should execute on Orders table, this trigger should execute or generate a PDF formatted report and finally mail it to Sales team?
    I'm using Oracle Database 10g. Rel.2 on Windows-XP.

    kamranpathan wrote:
    Is it possible to run a report in PDF format ad email it to some clients after a specific envent through Database Trigger. No. Not the way you imagine.
    A trigger is fired when? During the transaction. The transaction still is not committed and can be rolled back. So if you start doing notifications and what not in the trigger, and the transaction is rolled back, then that transaction never happened. But your notification code did. And the users have been informed incorrectly - about something that did not happen.
    The same trigger can also be fired in the same transaction for the same row - more than once. This can happen in specific circumstances in Oracle, where basically Oracle itself does an undo of the transaction (trigger already fired) and then redo that transaction (trigger fire again).
    So in such a case, your trigger will generate two notifications from the same trigger for the same event. Inside a transaction that still could be rolled back by the session owner.
    The correct approach is not to perform the action in the trigger. It is to queue the action to be executed when the transaction is committed.
    For example, the trigger is on the PRODUCTS table. When a new product is added, a notification needs to be send to customers that have selected to be informed of new product releases.
    The first step is to write a package that performs this notification. The procedure that drives the notification processing, gets a product identifier as input and does the checks and notification.
    After this package has been tested, it is implemented indirectly via a trigger on the PRODUCTS table. Instead of the trigger directly calling this package, the trigger needs to queue an action that will execute the notification package when the transaction is committed.
    This can be done using DBMS_JOB. In the trigger, a job is submitted to execute that notification package for the current product ID. The job submission is part of the existing transaction. If the transaction is rolled back, so is the job and it is removed from the job queue. If the transaction is committed, the job is also committed to the job queue and executed.

  • How i can generat VHDL or Verilog code from labview code

    how i can generat VHDL or Verilog code from labview code ( i have a labview code and i want to convert it to VHDL or Verilog code how i can do that )

    Mouath,
    There is no feature in LabVIEW to export your VIs as VHDL files. You are able to include your own HDL in your LabVIEW VI (using the HDL node). I encourage you to provide your feedback related to this issue at ni.com/contact. The product suggestion submitted are taken seriously and reviewed by National Instruments.
    Cheers,
    Jonah
    Applications Engineer
    National Instruments
    Jonah Paul
    Marketing Manager, Embedded Software
    Evaluate the LabVIEW RIO Platform! - ni.com/rioeval

  • Convert.To​Byte and logical masks, from VB to LabVIEW

    Hi guys,
    I have to write a VI communicating via RS232 with a microcontroller for a PWM application. A colleague has given me the GUI he has developpd in VB and I would like to integrate it into my LabVIEW programme by converting the VB code into Labview code.  Here's the code:
    Private Sub LoadButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loadButton.Click
            Dim bufLen As Integer = 12      // Buffer length
            Dim freq As Integer = 0      // frequency
            Dim pWidth As Integer = 0      // pulse width
            Dim dac As Integer = 0       // Value used in oscillator setting for generating pulse frequency
            Dim addr As Integer = 0      // Address of the pulse width in the pulse generator.
            Dim rTime As Integer = 0      // duration of machining/pulse train in ms.
            Dim returnValue As Byte = 0      // A variable for storing the value returned by the 
                                                           //microcontroller after it receives some data
            Dim buffer(bufLen) As Byte       // creates an array of bytes with 12 cells => buffer size = 8 x12 = 96 bits
    // can you explain a bit please I know you're converting the entered values into byte and put them one by one in a specific order. This order is how the 
    //microcontroller expects them
                addr = (Floor((pWidth - Tinh) / Tinc)) // Formula from hardware, calculates address setting for pulse generator to set pulse width.
                buffer(0) = Convert.ToByte(Floor(3.322 * (Log10(freq / 1039)))) // Caluclates OCT value for use in setting oscillator for pulse freq.
                dac = (Round(2048 - ((2078 * (2 ^ (10 + buffer(0)))) / freq)))  // Calculates DAC value for use in setting oscillator for pulse freq.
                buffer(1) = Convert.ToByte((dac And &HF00) >> 8)                         //
    // &H is the vb.net to tell it its hex code, F00 gives the top 4 bits from a 12 bit value.
                buffer(2) = Convert.ToByte(dac And &HFF) // For values that are larger than 256 (8bits) the value needs to be split across 2 bytes (16 bits) this gets the //bottom 8 bits.  &H is the vb.net to tell it its Hex.
                buffer(3) = Convert.ToByte((addr And &HFF0000) >> 16) // This value may be so large it requires 3 bytes (24bits). This gets the top 8 bits.
                buffer(4) = Convert.ToByte((addr And &HFF00) >> 8) // This gets the middle 8 bits.
                buffer(5) = Convert.ToByte(addr And &HFF)// This gets the bottom 8 bits.
                buffer(6) = Convert.ToByte((rTime And &HFF0000) >> 16) //This value may also be 3 bytes long.
                buffer(7) = Convert.ToByte((rTime And &HFF00) >> 8)
                buffer(8) = Convert.ToByte(rTime And &HFF)
                buffer(9) = Convert.ToByte(2.56 * ocpBox.Value)  // The ocp pulse period is formed of 256 steps or counts, so if a percentage is requested, this formula gives the number of steps/counts required to set the pulse width
                buffer(10) = Convert.ToByte(tempBox.Value)
                If (tempCheck.Checked = True) Then
                    buffer(11) = 1
                Else
                    buffer(11) = 0
                End If
                freq = ((2 ^ buffer(0)) * (2078 / (2 - (dac / 1024))))
                pWidth = Tinh + ((((Convert.ToInt32(buffer(3))) << 16) Or ((Convert.ToInt32(buffer(4))) << 8) Or (Convert.ToInt32(buffer(5)))) * Tinc)
                ' Connect to device
                serialPort1.Write(1) // Sends the number 1. This tells the microcontroller we are about to start sending data. It should respond with a zero if it is ready 
                                             //and the connection is good.
    The line "serialPort1.Write(buffer, 0, bufLen)" sends the buffered data where the variables are: buffer =  the buffered data; 0 = the position in the buffer to start from; bufLen = the position in the buffer to stop sending data.
    What's the best way to deal with the Convert.ToBytes and the logical masks And ??
    Thanks in advance for your time and consideration,
    regards
    Alex
    Solved!
    Go to Solution.

    Try this
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Upgraded from LabVIEW 8 to 2013 and now VI asks to find the installati​on package for Run-Time Engine 7.0

    I recently installed LabVIEW 2013 on a computer (running Windows XP 32-bit).  The machine also has LabVIEW 8 installed, which is what I was using prior to upgrading.  I opened a VI that was created in LV8 and then saved it and all its subVIs in LV2013.  Now when I open the VI in LV2013 and try to run it, a window pops up asking me to find the "lvruntimeeng.msi" installation package for LabVIEW Run-Time Engine 7.0.  If I cancel that dialog box and the subsequent message stating that the installion files were not found, the VI appears (at least from intial inspection) to run normally.
    I closed LabVIEW, downloaded Run-Time Engine 7.0 from the NI website, and tried to install it, but I received a message saying that it is already installed (as I had suspected).  How can I determine what part of the VI and/or its subVIs is trying to make use of Run-Time Engine 7.0?  Alternatively, how can I get LabVIEW to instead use the Run-Time Engine 2013 that was installed when I upgraded to LabVIEW 2013?
    Solved!
    Go to Solution.

    Bob_Schor wrote:
    Are you running your VI from a Project?  If so, you can look at Dependencies and get an idea what "dependent" VIs you might have.  There may be "something old" in your LabVIEW 8 code that has been superceded in 2013, but still "hangs around" -- if you can identify it, you can probably replace it with its "more modern" equivalent.
    If you do not have the VI in a Project, you can simply open LabVIEW, create a new blank project, and add your top level VI to it.  If all of your relevant VIs are in a single folder, add the entire folder.  Now look in Dependencies.
    BS
    Yes I am running the VI from within a LV Project.  After some more searching in the NI Knowledgebase I was able to fix the problem by using the following procedure:
    1.  Use the Measurement and Automation Explorer to uninstall Run-Time Engine 7.0
    2.  Restart the PC
    3.  Open the project, close the project choosing to "save all"
    4.  Restart the PC
    5.  Re-install Run-Time Engine 7.0 using a file downloaded from ni.com
    6.  Restart the PC
    7.  Open the project, close the project choosing to "save all"
    8.  Open the project and run the VI.  No more messages about LabVIEW trying to find Run-Time Engine 7.0.

  • How to restart windows driver from LabVIEW code?

    Hi
    I want to restart a window7's driver from my LabVIEW code. Is there any system VI to do that? Which palette should I use in this case? I want to restart windows 7’s driver of the network adapter. I have an Intel network adapter board installed in my system. To this adapter board I have an Intel dirver installed in windows7 operationg system. I want to restart that adapter board from my VI code. Or as alternative I want to disable and enable this adapter board from my VI. How to do that?
    Thanks
    Solved!
    Go to Solution.

    Look at the devcon command line utility. I believe you can use it to do most of the functions you can do from the windows device manager.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • How to updgrade to lion os 10.7 from leopard 10.6.8 using mac app store? unable to load redemption code to trigger upgrade

    how to updgrade to lion os 10.7 from leopard 10.6.8 using mac app store? unable to load redemption code to trigger upgrade.

    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes
    international calling numbers..
    For Mac App Store: Apple - Support - Mac App Store.
    For iTunes: Apple - Support - iTunes.

  • How to create a virtual FPGA and run LabVIEW code on it?

    Hi
    I am new to LabVIEW FPGA world. I have code written in LV 8.6 that was running on a Virtex 5. I need to run this code on a virtual FPGA but I need this to be as real as possible and maybe to acces this virtual FPGA also from another environment. Do you think this can be done? I need just a general answer to have an idea on this problem.
    Thanks

    If I've understood correctly, you have LabVIEW code written for an FPGA and running on an NI FPGA board, which you'd now like to run in a simulated system.  I doubt this is possible since I don't think there is a way for you to simulate all the hardware (DAQ and whatever else) that is attached to the FPGA on the real hardware.  Also, LabVIEW doesn't have any way of accessing an arbitrary non-NI FPGA target and without the LabVIEW interface I don't think your FPGA code will be too useful.

Maybe you are looking for