NI USB 845x SPI communication with Max1108

Hi,
I'm trying to communicate with the Max1108 (datasheet attached)
when using 8451 Test Panel I get random results,only once i got expected results and i captured this moment(i cant reproduce it somehow)
 I followed this code,
http://forums.ni.com/ni/attachments/ni/170/283809/1/MLX90316%20Read.c
which was published by NI in forums..and got same results when I use script functions(code1), and empty read buffer when using regular spi API's (code2)
Please  ignore the c# adjustments ..
what am i doing wrong ?
Thanks,
Ori
Attachments:
MAX11008 DS.pdf ‏646 KB
code2.txt ‏9 KB
code1.txt ‏3 KB

Solved, thanks for your "help"

Similar Messages

  • NI-8452 SPI communication with texas instruments ADS1278

    I'm looking for some help with setting up a Labview VI to use SPI communication between an NI-8452 and a texas instruments ADS1278 A/D converter evaluation board. From all of the sample VI's I have seen the LabVIEW routines vary widely for different models of Texas Instruments ADC's. My issue is how to deal with the DRDY pin on the ADC; it is an active low output from the ADC and signals when valid data is ready for retreival. 
    There is a DRDY pin listed under the SPI stream configuration property node, but I am not sure how to set this up as it is a seperate pin from the standard SPI 4-wire communication (SCLK, MOSI, MISO, and CS). Also, this ADC does not use the chip select (CS) line. I would like to set the program up so that an interrupt is triggered when the DRDY pin pullls low and enters a standard SPI stream routine.
    Any information on how to deal with this DRDY signal would be greatly appreciated.
    http://www.ti.com/lit/ug/sbau197/sbau197.pdf
    http://www.ti.com/lit/ds/sbas367f/sbas367f.pdf
    Thanks,
    Grant
    Attachments:
    ADS1278 SPI timing.jpg ‏86 KB

    I highly recommend saving the NI-845x Hardware and Software Manual if you are looking in using SPI communication with the 8452, as it is extremely helpful. We can see on page 387 (Chapter 14, section 4), there are descriptions for the extra SPI pins. The DRDY pin is configured as an input using GPIO1, so P0.1 for the 8451 and DIO1 for the 8452.
    Also, I would recommend posting any future SPI communication or NI-845x questions to the Automotive and Embedded Networks forum. This way you'll get exposure to other users that are more familar with what your looking into.
    Hope this helps!
    Daniel K | NI Applications Engineer | Certified LabVIEW Developer

  • USB-8451 SPI interface with analog devices isensor

    Does anyone has example VI using USB-8451 with analog devices isensor? I am new to SPI interface and very slowly learning how to use labview in conjunction with USB-8451 to do SPI sensor reading.
    Any help would be appreciated. I'm using labview 8.5. 

    elpiar wrote:
    It's working!
    Well, I realized I made a small mistake in the example. The number of bytes in the array constant should be 4, not 2. The device is full duplex, meaning you can write and read from it at the same time. The NI-845x SPI Write Read VI returns the same number of bytes as the number of bytes that were written. Thus, with just 2 bytes you will not actually get the current value of the register. You would get the values from the previous command. See attached mod.
    Now if I read the data is burst mode, will the output be automatically be arranged in an array of 8-bit length words? You mention something about send out out 8 clock burst. I'm not sure how I do this. 
    For burst mode you have to send out more bytes so you get clocks generated for the read to occur. The burst mode command is 3E00. That needs to be followed by 12 16-bit numbers for the device to return all the registers from SUPPLY_OUT to AUX_ADC. The actual bytes after the 3E00 are irrelevant for a write. The NI-845x SPI Write Read VI should then return 26 bytes (2 bytes that line up with the 3E00 command, followed by 2 bytes per register, for 12 registers). You can convert this into an array of U16 values and do the conversions based on which register you're actually reading. I've attached a VI to get you started. The example converts the SUPPLY_OUT register and each of the GYRO_OUT registers. You can finish the VI. Note that you should make the 14-bit to 16-bit extension a subVI so you're not duplicating code. 
    NOTE: As with all example code that is provided you should verify that the numbers you get are correct. We don't have the hardware, so we can't verify correct operation. 
    Attachments:
    ADIS16400 XGYRO_OUT v2.vi ‏29 KB
    ADIS16400 Burst Read Example.vi ‏36 KB

  • Reading data from mlx90129 rfid tag chip by using spi communication with labview?

    Hi,
     i have evb90129 evalution board in that mlx90129 chip and external memory (cat25128) and three external sensors are there, i am logging data from chip by using rfid reader it ok i am reading. at the same time i configured spi communication and  i am trying to read data i am reading data from internal memory not from external memory i tried but i didnt suceed , now can i use labview to read data from mlx chip and external memory. for spi communication i am using sparkfunction atmega168 microcontroller and also i have spi to usb cable? now can i communicate or i required any devies? is it possible?
    thanks in advance,
    biji.

    I suspect the culprit to be the first parameter to your function actually. Calling another function requires the caller to allocate any buffer with a big enough size for the function to write something into. Allocate that array by using Initialize Array with U8 as type and the correct number as size. Pass this size also as read_length. While your code doesn't make use of this I think the third parameter to your function is either wrong or unnecessary.
    As you use it now it is really nothing more than a local stack variable which you could declare inside the fucntion just as well. On the other hand what you probably want to do is have a function prototype like:
    extern "C" _declspec(dllexport) unsigned char read_Sensor(unsigned *char read_data, unsigned long read_length, unsigned long *byte_transfered);
    But you will have to do some modifications in your C code to support that parameter correctly.
    That all said, doing the same in LabVIEW using VISA functions would have been done with about two VISA nodes, no DLL headaches and probably already long ago working.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • SPI communication with 93LC46 EEPROM

    Hello awesome NI readers,
    I've been trying to communicate with my 93LC46 EEPROM device via SPI but haven't had much success. I am using the NI USB-8451 to interface with it. 
    The 93LC46 device is active high for chip select so I used the "General SPI Write Script" example and modified it a bit.
    I've connected 4 wires between my device and the USB-8451 device. SDI, SDO, SCLK and CS. pin 16 on 8451 to my SCKL, pin 15 on 8451 to my SDO, pin 14 on 8451 to my SDI and pin 13 on 8451 to my CS.
    The ORG pin on the 93LC46 is pulled down to ground (see wiring diagram) so it's a 128-8bit organization. The read instruction I am trying to send is 10bits long so I am sending 2 bytes, one byte at a time. 
    When i try to run my program and look at the SPI signal on my oscilloscope, all i see is my 4 lines toggle their signal once and then nothing. Obviously, I'm doing something wrong since I can't even see my clock signal running! I have attached the datasheet of my EEPROM device the wiring diagram for it. I also attached the code I am using. 
    Any help or advice is greatly appreciated! Hope this makes sense.
    Thank you.
    Serge

    Hi j_bou,
    Thanks for taking the time to reply. I did try the basic API but I realized some assumptions the code was making did not work for my device. The pulse that I was seeing on the SPI lines was a mix of low->high->low or high->low->high.
    Since I couldn't see any clock running, I was thinking that my EEPROM must be a slave to something else and running off their clock. This EEPROM is part of a board assembly so I was looking at what other IC's were on the board and there's a PIC18F252, so i'm thinking I have to write code to talk to the PIC to be able to talk to the EEPROM and that I cannot talk to the EEPROM directly. Hopefully, it works out!
    Don't know if I should keep this thread open until my problem is resolved because this issue might be related to something different that what I am asking here.
    - Serge

  • SPI communication with PCMCIA 6062E Card. Is it possible?

    Good night, budies. I need your help, cause I want to communicate via SPI with the 6062E Card. Is it possible? 
    Thank youU!

    You already asked this question.

  • USB to SPI Converter

    HiI'm trying to use USC-216 Isolated USB to SPI Converter with Labview.But I can't communicate with the unit Is someone familiar with this converter?Best regardsGuy  
    Solved!
    Go to Solution.

    Sorry about the late response
    I don’t have sample code but after I created inf file with NI driver wizard I managed to see the device by using VISA.
    Now my problem is that there is no response from the device
    The device is in bulk mode using endpoint 0 for enumeration, endpoint 1 for reception (IN endpoint) and endpoint 2 for transmission (OUT endpoint) Can you help me?
    Thank's
      Guy

  • Any LabWindows/CVI examples for SPI communication using DAQmx?

    I have a PXIe-6363 module in a PXI running as a real time target, and I'm trying to talk to an accelerometer that communicates with SPI.  I know the 6363 isn't one of the special modules built for SPI, but my understanding is it should be capable; the issue is just the programming.  I've seen examples of this for LabVIEW using DAQmx.  Are there any examples out there for doing it in LabWindows/CVI?
    I'm looking to save time and avoid reinventing the wheel here.  SPI is easy on an Arduino, so it should be doable in LabWindows/CVI, right?  
    Thanks,
    Matt

    Hey Matt,
    I was unable to find any full examples of SPI communication with DAQmx in C. My best suggestion would be to use the LabVIEW examples and implement the same series of function calls to implement the LabVIEW code in C. The DAQmx C API is good about keeping a standard with naming conventions to map with the function names in LabVIEW.

  • Using Labwindows CVI Version 10.0.1 USB communication with FTDI FT2232D to unit under test.

    Communication with unit under test works fine in hypterminal after I downloaded virtual driver from FTDI site.
    Never done any USB communication before in LabWindows CVI. What functions can I use in labwindows CVI?

    Since the device presents itself as a COM port (pretty standard with the FTDI chips) you should be able to use the RS-232 library in CVI.  OpenComConfig() will open a connection to the device, ComWrt() will write data to it, and the various ComRd() functions can be used to read the responses back.

  • LABVIEW programming USB communication with TDS2004B scope

    Is there anyone who has already programmed USB communication with Tektronix TDS2004B digital scope in LABVIEW?
    If that is the case, could it be possible to send me a basic vi that works?
    Thanks.
    João.

    National Instruments has a great library of drivers for various instruments. Most of these include programming examples.
    The drivers are searchable at www.ni.com/devzone/idnet
    The driver for your instrument is available here.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • USB Communication with Cygnal Kit C8051F320-TB

    Hi i am using Cygnal development kit C8051F320 - TB.
    I want to communicate it with LabVIEW.
    Some members in discussion forum earlier have posted queries regarding communication with LabVIEW to USBExpress development kit from Cygnal.
    My question is, " is it possible to use same DLL (sif32xusb.dll) supplied with USBExpress with this kit ? " .
    If anybody has tried then please send me vi along with firmware.
    Thanking you
    Ishant

    Hello Ishant,
    Based in the excerpt from the USBXpress programming guide, you should be able to:
    "The Silicon Laboratories USBXpress Development Kit provides a complete host and device software solution for
    interfacing Silicon Laboratories C8051F32x microcontrollers to the Universal Serial Bus (USB). No USB protocol or
    host device driver expertise is required. Instead, a simple, high-level Application Program Interface (API) for both
    the host software and device firmware is used to provide complete USB connectivity."
    It looks like aa1982 got it working on this post:
    usb communication with silicon lab c8051f320
    And both are using the C8051F32x series controllers, you may want to get in contact with the owner of that thread to see if he encountered any problems.
    Xaq

  • Communicating with HID Class using USB RAW

    I'm attempting to communicate with a HID class USB device (not a keyboard or mouse).  I've gotten the USB device to enumerate (with some significant effort) as an NI VISA USB device by using the Driver Development Wizard.  I know that I'm supposed to use interrupt transfers to endpoint 1 (index), the Set_Report HID request is 0x09, and the HID decriptor type is 0x21.  I think the value arguement on Control OUT is 0, but I'm not sure.  It seems like I've thought of everything, but the device still does not respond.  I see stuff happening when I probe the bus.  Has anyone done anything like this before?  Are you supposed to use the USB Control OUT VI for an interrupt OUT request?
    See attached .gif of code.
    Thanks,
    Brandon
    Attachments:
    USB_HID_Code.GIF ‏15 KB

    The first answer would be if it doesn't do it when something is one way, then do it that way. Seriously though, what do you mean by corrupted? Gaps in data? How fast are you transfering data? It may be that the processor just isn't keeping up, the UI thread for LabVIEW can take up a fair amount of processor, as do most visual "events" in Windows. It may be that the structure of your data transfer part isn't able to keep up when there isn't enough processor available. There are ways to write LabVIEW code that is more efficient that a similar function written differently. What are you running this on, a multi-core machine by any chance? If yes, then it might benefit from LabVIEW's ability (in the most recent versions) to select which core to run on.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Usb communication with silicon lab c8051f320

    hi
    I want to communication with the silicon lab c8051f320 use the usbxpress development kit he provide
    there is many example using vc vb,but it did not have any example use labview
    for the host (pc), it provide a dll (see the appendix),
    I have tried many method, but the labview always crashed when the dll is called
     does anybody who have used c8051f320 can give me a advice.
    the dll and usbxpress development kit are in the appendix.(the sif320xusb.c is a dll, please change its Postfix from c to dll) 
    i really need your help
    Attachments:
    SiF32xUSB.c ‏64 KB
    USBXpress_ProgGuide.pdf ‏84 KB

    I investigated this a bit further.  SiLabs latest version is version 3.0.3 and if you are using this, LabVIEW may not work properly.  After many failed attempts to get this working, I reverted back to version 2.4.2 which I am able to get working in LabVIEW just fine.  You cannot download older versions directly from their website however.  The primary difference between version 2.4.2 and 3.0.3 is the function prototype.  SI_Write and SI_Read v3.0.3 have an additional OVERLAPPED pointer parameter that you may have to add to the library call.  However, I found this out after I reverted back to 2.4.2 and haven't attempted again to make 3.0.3 work.

  • LabVIEW 2011 and the USB-845x

    Hello there,
    I was curious to see if anyone else had the same problem and a resolution to my issue. I have Windows 7 x64 and recently did a clean install of LabVIEW 2011 x64. I have a USB-8451 SPI/I2C card that I am trying to make available to use in LabVIEW. The newest drivers (2.0) say in the readme file that Windows 7 x64 is supported and that LabVIEW 2011 x86 is supported but not x64. I installed and tried it out to no avail. However upon copying and pasting from the Program Files x86 to the Program Files (64-bit) LabVIEW folder, I now have the 845x palette available under the Instrument I/O main palette but everytime I choose one for the block diagram it asks for the location for the ni845x.dll shared library file. The only one I found on the whole system was in C:/Windows/SysWOW64 and I link to that file and now the VI's error out saying the library wasn't found/loaded and am just stuck now. Any help would be greatly appreciated.
    Thanks

    The issue has to do with being able to (or rather not being able to) load 32-bit DLLs into a 64-bit process. While the driver readme says that it's compatible for both Windows 7 32-bit and 64-bit, that's not the same thing as saying the DLL is 64-bit. And in order to be able to use it from LabVIEW 64-bit you need a 64-bit DLL. This is an operating system limitation, not a LabVIEW one. Thus, you have to use LabVIEW 32-bit. Your license allows you to install both 32-bit and 64-bit, so unless you have a specific reason to use 64-bit LabVIEW (like you're trying to manage gobs of memory), stick with 32-bit LabVIEW for now.

  • Dual spi device with one master and one slave on the PC end

    The powers that be want to emulate a hight speed RS-232 connection to an instrument we are building. We don't want to poll the instrument to see if it has data. They want the instrument to have both master and slave SPI busses so that it can push data to us.
    I need to find the PC hardware to do this that is compatable with LabView so I can test it. It doesn't have to be a single device. It could be two as long as one can be master and the other slave. We have the NI USB-8452 but it can't be slave.
    TIA  Norm
    Attachments:
    Dual SPI.png ‏26 KB

    Hi Viper
    You are right, the 8451 can only be configured as an SPI Master. For creating a slave you would have to choose an FPGA based solution. Depending on the hardware from NI that you currently have, you can choose from different FPGA cards or devices. I found some links that might help you with your search:
    Community: SPI Slave Device in FPGA
    White Paper: Implementing SPI Communication Protocol in LabVIEW FPGA
    Forums: Slave SPI product recomendation
    Forum: SPI in FPGA Multifunctional card discussion
    White Paper: SPI and LV basics (check section 7)
    Hope the information provided is helpful.
    WenR

Maybe you are looking for

  • Executing a shell script from a Trigger

    All, I have to write a script to do the following requirement. There is a file called BUSINESS_DATE.TXT. This file get updated once the oracle partition created. In Oracle, Partition will be created every day. There is a seperate script scheduled to

  • I am unable to add my iPhone contacts to my icloud contacts as viewed on my Mac Pro

    I am just learning about how to use the iPhone 5s and the Mac Pro and don't know how to merge my iPhone contacts and my contacts on my Mac Pro OSX 10.9.1, which are somewhat different, any ideas? I have been using I Cloud on my Mac Pro and on the iPh

  • Customisin Look and Feel

    I am still in the process of "finding my feet" when it comes to programming with Java, and as a result need a little guidance. Could anyone please tell me of a good place to find information that offers tutorials or good explanations of how to custom

  • RTMT shutsdown when collecting files

    I am using RTMT 8.7 and when I am in Trace & Log Central and attempt to collect files RTMT just crashes.  Using Win7 64-bit, no application logs within windows to give me insight to this problem.  Anyone else seen this? 

  • 2.0 firmware is available for purchase now, but can anyone buy it?

    I click "Update" in iTunes and it prompts saying "A new iPod software version (2.0) is available for purchase..." when I click "Learn More" I get an error, I've been at this for about 5 minutes now. Has anyone actually got through?