Reading spi shift register bit with NI 8451

Hello
we are proposing to use SPI communication with NI 8451.
we would like to know as how we could find whether the SPI shift Register bit has been set and also is there any direct means of
sending this bit result to DAQ without programming.
Thanks
Bhavani

Hello Bhavani,
The USB 8451 does have DIO lines available and can be programmed by the SPI output.  Please see the USB-8451 User Guide and Specifications for more information about that.  If you have any more specific questions, please let me know.
Thanks,
Meghan
Applications Engineer

Similar Messages

  • How do i read the Shift register value of a vi which is written in the teststand sequence from labview exe

    Dear All..
    My Qusetion is ... I have a VI in which I can writ the data to shift register and I can read( Differenent cases). I am Running the VI in write mode to write SAY '100' in the shiftreg( VI will be In teststand Sequence) . And I am reading the VI in read mode using Labview. I am getting the data in labview.
    When i conver my Reading Vi which is having that Read/Write vi in to EXE even then the test stand is writing the data to VI is Unable to reflect in labview.
    Please Help me out with some solution.
    Thanks
    bhargav

    I'm confused by your question:
    Are you trying to transfer data from an Exe to TestStand and vice versa?
    Or are you changing existing, working VIs into EXEs and then wondering why they won't behave the same?
    Can you clarify some what your goal is?
    There may be a better way to do what you want.
    Thanks,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to program shift register to read only when a new user is detected from user?

    Hi,
    I'm currently developing a program for position control in labview. The program is quite simple, whereby user will input the distance that he wants the table to be in the labview program, and labview will send signal to move a motor that will turn a ball screw to move a table horizontally to the targetted position. The criteria is that the profile of the motor depends on the distance it needs to move, whether a two-phase (acceleration and deceleration) or three-phase (acceleration, constant velocity, deceleration) to reach the target position.
    The problem occurs when the user wants to enter a new position (second input) for the table, as the input by user is position the table needs to be but the input required to determine which profile the motor follows depends on the distance that the table will move to get to the targetted position. Therefore, I would need a function to store the input by user temporarily, and recall it only when a new input from user is detected. By this, I would be able to use the difference of the input (input [n+1] - input[n]) and feed it to determine which profile the motor follows and the input by user can be kept as the position he wants the table to travel to (to compare with encoder).
    I thought of using shift registers to do this, but I am not able to make it to perform the deduction ([n+1] - [n]) only when it detects a new input. When i try using shift register, it travels to the targetted position, and one it reaches it will travel back to the original position. For example, when a user input 90, it means the table needs to move to point 90. As the shift register is initialized to 0, it will move to point 90 (90-0 = 90) but upon reaching 90, the shift register sends a signal of 90 (90-90 = 0) and the table returns to it's initial position.
    Is there any way that I can delay the reading of shift register only when a new input is detected or is there another way for me to achieve what i want?
    I've tried searching the discussion forum and ni website but couldn't find similar problems. Thanks for your help in advance.
    Solved!
    Go to Solution.

    Hi,
    I've managed to get what I needed by using a shift register + event structure as suggested by Adnan. However, I face another problem after implementing SR+event. I've attached two files, first the original program and second the updated program using SR + event. (it's only the jpg file as I've forgotten to save the labview program, will upload the program by tomorrow.
    In the original program, I have an elapsed time that is able to run continuously when I run the program. In the updated program, my elapsed time don't seem to run continuously when I run the program (as shown by elapsed time indicator). I need the elapsed time to run continuously as a input to calculate my motor profile.
    I suppose this is caused by the introduction of the event structure, will adding a case structure to wrap the event structure solve the problem or is there another way to get pass this. Appreciate if someone could drop me a pointer or two.
    Thanks
    Attachments:
    Mar 16 - continuous elapsed time.png ‏12 KB
    Mar 16 - elapsed time not continuous after introducing shift register + event structure.png ‏17 KB

  • Questions about shift register

    hello!When I use the shift register,A problem occur!what I want to use is the serial in shift register function,But found only use parallel shift register,someone can give me any suggestions?(The best way has an example of a serial shift register),thanks!!!
    Solved!
    Go to Solution.

    I want to achieve :Each element of the array in the shift register Compare with 5,If less than 5, the output is 1, otherwise 0;but as you can see the vi is wrong ;Error reason is because of the shift register only for computing the entire array but not Single element,any suggestion?
    Attachments:
    the vi.png ‏8 KB
    array.png ‏5 KB

  • Invalid pointer when printing from Internet Explorer 64 bit with Adobe Reader 11.0.7

    If I print a PDF file in Internet Explorer 8 or 9 64 bit with Adobe Reader 11.0.7 on a Windows 2008 R2 server with the File --> Print (or CTRL+P) option, the file won't print. It generates the error "Er is een onjuiste parameter" (Dutch version). I can print the PDF file with the Adobe Reader option. The 32 bits version of IE8 or IE9 works fine. Also the Adobe Reader versions before 11.0.7 works fine. One fix in 11.0.7 is "64 bit IE plugin - required to run IE 11 with Enhanced Protected Mode on in Win 7". Is this the reason that IE8 or IE9 64 bits doesn't work anymore with the CTRL+P option?

    You can try using this tool to first remove all traces of Reader from your computer: http://labs.adobe.com/downloads/acrobatcleaner.htmlThen, you can download the full offline Reader installer from http://get.adobe.com/reader/enterprise/ After downloading, restart your computer and run the installer before doing anything else.

  • What is the maximum number of the parallel blocks or maximum pair of shift register used in FPGA VI time loop with cRIO 9104?

      I am writing a FPGA VI with module cRIO 9104, I need to do a lot of parallel execution of inside a timed loop. In total, I have used 20 pairs of shift registers in the timed loop, which simply means there is 20 parallel exceution across ONE time loop. However, it tells me that there is an over-used of the FPGA resources in the compliation report. One is the Slices and the other is the number 4 of LUTS ( see the attached file), would the compile will be sucessful if I change it to ALL block diagrams cascaded in series without using any shift register accross the timed loop? And do you think that it is reaosnable to have 20 pairs of shift register arranged in parallel inside a timed loop.
      Thank you!
    Attachments:
    afternoon912.jpg ‏2305 KB

    Your compilation report has 2 useful numbers to help answer your question, I'll summarize:
    Number of Slice Flip Flops = 27%
    Number of 4 Input LUT's = 100% *
    You are using the Timed Loop Shift registers to pass a value from one iteration of your loop to the next.  The LabVIEW FPGA compiler will use Slice Flip Flops to create this behavior in the FPGA fabric.  You are only using 27% of the Flip Flops, therefore the 20 Shift Registers are not your problem. 
    LUT's (Look Up Tables), which are the basic logic building block of an FPGA, are your problem.  You are using over 100% of the LUT's in this FPGA.  To fit in this FPGA you will have to reduce the amount of logic (and/or gates, additions, comparisons, etc.) in your design.
    -RB

  • Unxepected behaviour with clusters inside of while loop with shift register

    Colleagues,
    I just would like to post here small, but important bug (I guess this is the bug), which was found by coworker today morning. Just would like to share knowledge, and probably this will save some debugging time for you...
    So, the problem that you can get wrong content of the cluster in some cases. The cluster used inside of while loop with shift register (we using this construction for functional globals), and after bundle operation you can get data, which are not expected:
    See also attached code for details (LabVIEW 8.6.1, WinXP Prof SP3).
    best regards,
    Andrey.
    PS
    Bug report already sent to NI.
    Message Edited by Andrey Dmitriev on 10-16-2008 12:30 PM
    Attachments:
    BugwithClusters.png ‏15 KB
    BugwithClusters.zip ‏10 KB

    Thanks Andrey for brining this to our attention!
    The "Show Buffer Allocations" reveals that LV is not processing the code in the right order.
    Under ideal conditions, all of the data should be manipulated using the buffer "A". But as this demo shows the data is being processed in the wrong order.
    The previously posted workaround get around this by forcing the array operation to happen first, but this resluts in two additional buffers "C" and "D" and then copy this back into "B".
    Using an "Always Copy" is another workaround that uses a seperate buffer "F" to hold the data being moved from the first cluster to the second inside "E".
    I think you won a shinny new CAR* Andrey!
    Ben
    CAR = Corrective Action Report
    Message Edited by Ben on 10-16-2008 08:05 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Cluster_Bug.PNG ‏57 KB

  • Can I do the equivalent of a shift register with a variable start value?

    I have an array of samping frequency values (determined by an external signal) and I would like to extract one value at a time from this array to use as the sampling frequency for another signal.
    The shift register almost does what I want. The problem is that I don't always want to start at element 0, but rather at the first positive sampling frequency value, which has a slightly different index each time. Once this value is reached, I want the index to increment by 1 each loop iteration (which it already does).
    I have attached a VI for reference. Any suggestions?
    Solved!
    Go to Solution.
    Attachments:
    indexing question.vi ‏69 KB

    Laura121,
    I can think of two ways to do that. One is to place a copy of the DAQ Assistant outside the loop. Take one reading to get the initialization value for the shift register then proceed as you are now doing for subsequent measurements.
    The other way is do the initialization in a case structure. When  i = 0 (first iteration), initialize the shift register. For i > 0, use existing code.  This method would only require one DAQ Assistant.
    It is not clear that your code or either of the approaches I described actually does what you said you want to do in the original post: "...extract one value at a time from this array..." Each time through the loop you take another set of readings, discard all the old data, and take one sample from the array at the index determined by the shift register.  This is not what I would consider extracting one value at a time from the array.  If you really want to go through the entire array, you need to do the sampling frequency extraction many times for each DAQ Read.
    You also should have some error handling to consider the case where no element in the Array of Sampling Frequencies is positive or the case where you have reached the end of the array.
    Lynn

  • Task out with a shift register using ULx

    This post below describes my same problem of passing a task through a case structure but they are using the DAQmx Library and it has a CreateTask.vi which the ULx Library doesn't have.
    http://forums.ni.com/t5/LabVIEW/passing-DAQmx-task-out-through-a-shift-register/td-p/410447
    Any suggestions as to how to get my task out through the shift register?
    Thanks
    -CC
    Solved!
    Go to Solution.

    I have never had a problem getting ULx task out of shift register.
    This is an action engine that I use to store the ULx tasks ref to use later in the code.
    Omar

  • LM92 I2C temperature sensor with NI-8451

    Hello !
    I try to communicate with a LM92 temperature sensor via the NI USB-8451 by I²C protocol. I have an issue with the addressing because the 7 bits sensor address is 1001011 (A1 and A0 set to 1) but the LM92 is working in little endian (LSB first) and Labview adds the R/W bit at the end of the address so the complete frame sent to the LM92 is 1001011R/W.
    I'm trying to find a solution to invert the complete frame before seending it in order to communicate with the LM92.
    Labview returns the error -301742 because the address is not the wright one and i can't find how to send the adress in little endian.
    I just need to read the temperature register of the sensor so i don't need to write anything in it.
    Does anyone have an answer ?
    Solved!
    Go to Solution.
    Attachments:
    LM92CIM.pdf ‏773 KB
    Temperature read.vi ‏17 KB

    Sanguigui wrote:
    Hello !
    I try to communicate with a LM92 temperature sensor via the NI USB-8451 by I²C protocol. I have an issue with the addressing because the 7 bits sensor address is 1001011 (A1 and A0 set to 1) but the LM92 is working in little endian (LSB first) and Labview adds the R/W bit at the end of the address so the complete frame sent to the LM92 is 1001011R/W.
    I'm trying to find a solution to invert the complete frame before seending it in order to communicate with the LM92.
    Labview returns the error -301742 because the address is not the wright one and i can't find how to send the adress in little endian.
    I just need to read the temperature register of the sensor so i don't need to write anything in it.
    Does anyone have an answer ?
    I do not have the USB-8451 to check this myself, but based off of this document: http://www.ni.com/white-paper/5767/en/ I would guess you should be looking into these two VIs:
    Advanced LabVIEW API for Device Addressing
    Use the Script Address + Write or + Read Functions after a Script Issue Start function to program the device address.
    Note:  This, however, is just a shot in the dark.  It seems like deep down they are calling a library, so it may be out of your control unless you have access to the library being called as well. 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • Using a shift register to detect input...

    Hi guys,
    I'm creating a LabVIEW VI that needs to be able to detect when a user changes an input. I read a previous post that suggested using clusters and shift registers to compare previous data.
    My question is how do I use shift registers? I've created a shift register on a for loop, but I'm not sure when to compare the "previous" data to the "new" data. Do I need to add an element to the left side and compare it there? Is the right side the output? I'm just not sure how it works. An uploaded example would be nice. Thanks.
    -Mike

    Shift registers are very powerful but difficult to use for the first time.
    The shift register you just created has two "arrows", one on either side of the structure. The arrow to the left is the value from the previous (i:th) iteration and the arrow to the right you have to feed with the (i+1)th value.
    Now, if you want to compare values and look for a change you can compare your old value (the one coming out from the left) with the new value in your for loop. The feed your new value to the right arrow so that it becomes the old value for the next iteration.
    If you have many parameters to compare, clusters are very useful since they make things very compact. If you are comparing clusters, do not forget to change the setting on the comparison to compare aggregates (r
    ight click on it and select that option).
    Also, in most cases you need to set the initial (start) value for your shift register. This is done by feeding the left arrow with the default value from the outside of your loop.
    I attached a simple example, CompareSettings.vi, that shows how it works. Hope this helps. /Mikael"
    Attachments:
    comparesettings.vi ‏32 KB

  • Error 1 Configuration VIs while Passing Refnum through Shift Register on Mac

    All,
    I am using LabVIEW 2013 SP1 with Mac OS X (Mavericks). I have a simple shift register VI that initializes a .ini file, reads/writes, and closes. I've done this plenty times on windows with no problem. I wrote a quick VI on Mac and I get Error 1. I can't figure out what the problem is. I am attaching my VI. Can somebody shed light on this issue please?
    Kudos always welcome for helpful posts
    Solved!
    Go to Solution.
    Attachments:
    Config File Utility.vi ‏17 KB

    rolfk wrote:
    Keeping the AE in memory is not enough! The Top Level VI in whose hierarchy the Open Config case is executed needs to stay active (eg. not going idle) for as long as you want the open configuration to stay valid. The underlying object where the configuration information is stored in is a queue and that is a refnum like any other refnum in LabVIEW. And all real refnums in LabVIEW (except optionally the VISA ones) will be closed as soon as the top level VI in whose hierarchy the refnum was created/opened goes idle (stops executing).
    Actually even with VISA, "User Data" is lost when the caller goes idle although, VISA will automatically re-open a session identical to the previous session for that alias. Just "User data" isn't preserved in the session history.  Ditto for DAQmx, last session information is externally stored and retrieved (The lookup is by string- so you can coerce a string to VISA Alias or DAQmx I/O container.) the "Session histoy sticks around as long as the VI is in memory.  A trick I learned with an  init all vi call in a TestStand sequence Pre-UUT loop and a model that unloaded the modules when complete.  (I recall I just opened the VI FP "Hidden" as a work around)
    Most NI-Drivers (NI-DMM, NI-Scope etc...) also have this external since really they all use "VISA" down deep (an oversimplification but a good rule of thumb)
    THE EXCEPTION: Software defined instruments.  These act like file refnums and become invalid when the top level vi goes idle. Its the FPGA refnum that dies the sudden death on the "Legacy" drivers. I have not played with "RFmx" and wouldn't mind learning what happens in there.
    And just too really turn it all on its head, There is an LabVIEW Configuration option to "Automatically Close VISA Sessions."  Check that box and the external VISA storage is tossed under the bus so all those sessions you stored on a USR go invalid as soon as the Top Level goes idle
    Some days that can really bug you
    Jeff

  • Any way to save data in loop without using shift register or feedback loop

    Hello all
    I was thinking, is it possible to save data in a loop to next iteration without the use of a shift register or a feedback loop?
    I need the possibility to reload data within a loop from a lvm file, but I want to use the same data until i load some new ones.
    The reason why I don't want to use the shift register or feedback node is due to speed, even though I am not sure if the shift register
    actually moves all the data from one register to another, or if it is stationary until a change in the data occur.
    The data I want to reuse is medium-large (6 force measurements, 2 pressure, 1 flow channels)of about 10sec data in each file with samplingsrate of 2kHz..
    In my analysis program I have many CPU demanding calculations and 3D graphs, so I just want to minimize the CPU load as much as I can for each part of the
    software..
    I have attached a small VI to explain what I am talking about.
    I now I shouldn't use the express VI, and I am going to change that as well - this is just a proof of concept! 
    Hope you guys can help me understand this shift register better...
    Thanks!
    - Tommy 
    Running LabVIEW 2009 32bit SP1 on Windows 7 64Bit
    Solved!
    Go to Solution.
    Attachments:
    visual.vi ‏34 KB

    tombech wrote:
    [...]The reason why I don't want to use the shift register or feedback node is due to speed[...]
     Tommy,
    shift register are the fastest you can ever get...........
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Problem in using the shift Register

    I have a problem regarding shift register when i was using it in my application.
    During the runing of the application i found that sometime shift register not pass the value to the case structure. at that time result is not displayed.
    i have attached the application in which that problem occur and the process regarding the execution, how bug produce and how to check where the shift register stop. please find the attachment and reply on the same.
    Attachments:
    Shift Register Checking Application.zip ‏173 KB

    I'm sorry but I don't understand your program.  I only see one shift register in Result Display.vi.
    What I do see is a lot of odd constuctions of while loops that only run once in your Main.VI.  Also, a heavy reliance on global and local variables that I suspect are leading to race conditions.
    Have you tried using the debugging tools such as probes and highlight execution to see our your application is behaving?
    I'd also be concerned about how you have "Lock Front Panel Until Event Completes" in the cases of your event structure.  And those event call other subVI's that may take a while to run and rely on user interaction with the front panel.  I also don't understand why when I hit "OK", the subVI front panel remains open.  It just makes running your application that much more confusing.

  • Adding Shift Register to Stacked Case structure

    According the the Help, you can add Shift Registers to Structures.  The Stacked Sequence is a Structure, but I don't see the option to add a Shift Register when I right click on the left side of the Structure.  Am I missing something?  I want to run my Error In and Error Out lines through the Shift Registers in a Stacked Sequence so as not to have to do it using a Feedback Loop, as that would get messy.
    Solved!
    Go to Solution.

    Newenglandguy_LV wrote:
    NIquist wrote:
    I think what you want is the "Add Sequence Local" function which allows you to pass data from one frame to the next.  It's an ugly, confusing choice when you have much better options though. 
    It sounds to me like you just need to create some subVIs to better compartmentalize your code.
    I do understand your comment about compartmentalizing, but if I did that I'd have a VI for every few event sequences.  The only reason I'm putting them in a stacked sequence, is to allow whom every might want to understand the flow, not to have scroll across.  If I was working in a coding language, this would be a simple series of commands, in maybe 10 lines of code.  But that's where I'm struggling to see some of the advantages of LV.  I simply want to have errors flow forward, and send a series of commands to the same instrument with some delay in some cases.
    Perhaps it would be easier to help you understand if you posted the code you have so far. Are you using the sequence frame because you are using the Wait function, which has no error in/out terminals? If so, you can easily whip up a wrapper VI for that function.

Maybe you are looking for

  • Error Using JCA AQ adapter OSB11g

    Hi i'm using aqAdapter with jca in osb11g. I followed the manual Oracle Service Bus (OSB) 10.3.1 – JCA Transport with AQ Adapter Tutorial http://www.oracle.com/technology/sample_code/products/osb/index.html with some little diferences, I got the serv

  • Deleting Movies from Hard Drive

    I wish to make some space on my hard drive and have all movies backed up on a seperate 'Lacie' hard drive via 'Time machine'. I have a lot of projects on iMovie HD which I wish to delete from the Hard Drive. Problem is, I can't. Every time I try and

  • Restoring keywords & edits to Library

    I recently lost my Library6.iPhoto file to corruption and in the process I lost some editing and keywording changes I had made. I have recent backups to this file that I am going to use but the recent keywording and editing changes won't be on it. I

  • Nov 16th I was asked to download a security update of Firefox, but when checking in the normal way, was informed that my v 25 is up to date. Was this a hijack?

    This may have been a "near miss". If it was, it is rather a warning, to the community, if anyone else has been asked to run an update, when none was required. This must be a good way to download some malware. Fortunately, I was busy so did not respon

  • My mass mailer is not worikin

    hi, i got one script from the internet and changed a little bit to work with mass email system like sending 5 mails per refresh, but due to some cause mails are not going.. what i am trying is making the field active set to 1 when mails are going and