Jump to content

control MCP41XXX digital poti over SPI with DAQ PCI 6220


Recommended Posts

hello,

I try with the DAQ card PCI 6220 via the digital outputs LINE0: 2 (CS, SCK, SI), the digital potentiometer MCP 41XXX over the SPI interface to control. Unfortunately this does not work. I have a Vi to created the digital signals (picture) and another Vi to output (picture) them on the DAQ card. Phase and polarity of the SCK clock can I change. Unfortunately, the potentiometer can not be controlled with this program. Has anyone a Idea where the problem might be?
 

Thanks

 

JimPanse

post-52628-0-21374400-1409159251_thumb.p

post-52628-0-33052300-1409159259_thumb.p

post-52628-0-39268400-1409159268_thumb.p

Link to post
Share on other sites

Wow I always wondered if I could use a series of DIO lines to make a SPI device.  You haven't confirmed the fact that you can or can't yet but it is interesting.

 

What is wrong with using a cheap USB to SPI device?  NI does sell their USB-8451 which is a SPI device and works quite well.  Of course a much cheaper option would be an Arduino Uno and the LIFA Toolkit which has a palette for doing SPI or I2C.  I've used both of these for SPI communication and never had a problem.

Link to post
Share on other sites

Hello hooovahh,

Thanks for your reply. I use the DAQ card because it is there. I have found no reason why it should not go with the DAQ card.

If it does not work I'm going to implement the Arduino.

Unfortunately, the question remains as to why the current approach is not working.

Link to post
Share on other sites

What is wrong with using a cheap USB to SPI device? NI does sell their USB-8451 which is a SPI device and works quite well.

We have about a dozen of those devices. While neat and good for simple SPI stuff, we have found them rather limiting. For most applications we end up with some horrible hacks and software timing to overcome limitations in the NI SPI API, or at least the parts of the API that that device allows you to use.

Link to post
Share on other sites

What limitations are you referring to?  And how did you get around them?  I have only used these devices (and the Arduino SPI) on very simple slow devices for getting voltage readings, so maybe my application didn't see the limit you did.

Link to post
Share on other sites

I'm running off memory here on a project I last touched about a year and a half ago, so things are a little bit rusty. There is a thread though regarding the issues I came up against.

 

The limitation that word lengths are limited to 8 bits and every word is a discreet set of clock pulses is a potential deal breaker, though it didn't affect me in the end. If you're pushing/pulling registers larger than 8-bits you need to combine discreet transfers which may introduce issues depending on the timing strictness of the device is on the other end.

 

My biggest beef with the devices is they locked out the lowest level palette which in theory could do most of I wanted. Since I had a dozen of these things, I instead had to so some really ugly software triggering which I would never want to push into a production environment. Even if the low-level palette was unlocked it still has limitations on frame length which seem rather arbitrary to me and I question if I could have been successful with their other 8452 option.

 

What I learned from working with those devices is they are really only useful for very simple operations. SPI is a low level protocol, so I expect to be able to configure the hell out of it. The NI API just isn't flexible enough, or if it is isn't documented well enough. The next time I need SPI, I'll be going down to the FPGA level (or perhaps another vendor).

 

PS: Sorry for the highjack. I have no recommendations for your issue, Jim.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Zyga
      LAVA users,
      We are looking for alternatives for NI DAQ devices for industrial automation. Since NI has its devices mostly focused on advanced/high speed/high precison data acquisition/processing its prices are inadequate to simple automation tasks. 
      I would also say that NI PC based daq systems are expensive if need to be distributed systems (found this but still relatively expensive cRIO required).
      Just now we need to extend our compactDAQ based system with two DIO modules. We even have free chassis slots for this, but station that needs this IOs is few meters away from PC. How easier would it be if we could use single ethernet cable..  Ofcourse we can add another small cDAQ (what we probably going to do) but this is slightly expensive solution for our customer.
      Does anyone have some experience with 3rd party solutions? Any known daq devices vendors? Standalone ethernet daq modules?

      Regards,
      Zyga
    • By Gab
      Hello Everyone,
      Need some verification with daq program.
      I have one force sensor that connectd with my usb daq device. with this force sensor, unknown object is connected(hanging) and i want to find the mass of this object (F=ma) so i am taking continous sample and generate waveform graph. After the scaling, my waveform will be in Newton unit.
      my question is: if i take RMS of this waveform(1d Array data point) and divide by g (9.8 m/s2) then whatever value come is my correct mass? (F=ma).
      Thank you in advance
    • By Atron100
      hi
      i have a question in basic understanding of update rate sample rate samples per buffer and cycles per buffer.
      i have DAQ 6343 and electronic circuit. 
      i'm using AO0 for generation sine wave at these frequencies 10Hz, 100Hz, 500Hz, 1kHz, 3kHz this signal enters to electronic circuit.
      and after conversion i must to measure two outputs of this circuit by AI2 and AI3.
      from my understanding of tech spec of the daq analog output update rate is 900kS/s and analog input update rate is 500kS/s
      as i understand if i have freq = 3kHz the maximum sample rate per buffer is 300 samples
      and if i have freq = 10Hz i can generate this signal with 90000 samples per buffer?
      for analog input the formula is the same?
      that meaning of cycles per buffer?
      which sample rate of AI i need to setup to measure data fast and accurately? 
       
      thanks for answers
    • By RomainP
      View File MPSSE SPI
      For a personal project, I needed to communicate between my computer and a SPI device slave device. So, I use a FTDI chip FT232h.
      I have adapted the library MPSSE I2C already available on this website to make it works for SPI.
      Warning ! VI are not 100% tested (especially Read functions), I provided it as it is.
      Submitter RomainP Submitted 02/01/2017 Category *Uncertified* LabVIEW Version  
    • By RomainP
      For a personal project, I needed to communicate between my computer and a SPI device slave device. So, I use a FTDI chip FT232h.
      I have adapted the library MPSSE I2C already available on this website to make it works for SPI.
      Warning ! VI are not 100% tested (especially Read functions), I provided it as it is.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.