LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication

Hi All, 

 

I am working on a Cycler which uses a DC Regulated Supply Unit for power. It can be remotely programmed using a Programmable Resistor. However, the programmable Resistor which I am using can be programmed by SDA input pics (Data has to be input into this pin serially corresponding to the value of the resistor). 

 

Can you guys please help me to do this using LabVIEW?? I have a PXI 1052 Chassis with a PXI 6251, SCXI 1300, SCXI 1303c and SCXI 1104 modules. 

 

I need to feed some numerical data into this resistor serially using this single pin. 

 

Please hep me out!!

 

RJ

0 Kudos
Message 1 of 12
(3,449 Views)

Is the input like a serial port?  Does it accept characters?  What is the protocol?  Is there a clock?  We need more information.  Read the manual for your device.  It should specify how to send in the data it requires.  It should specify some type of protocol, like RS232 or SPI or I2C.  Without knowing more details, no one can help.

- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 12
(3,423 Views)

SDA sounds like it's I2C. But I agree that you need to provide more details, like the model number of the supply, or some information on the programmable resistor.

0 Kudos
Message 3 of 12
(3,408 Views)

Hi All,

 

I m sry for the scanty Info. My PSU is HP6260B.

 

And the programmable Resistor is an AD5248 (http://www.analog.com/static/imported-files/data_sheets/AD5243_5248.pdf).

 

Yes, it is an I2C with an SDA pin that is used to input all of the data.

Please let me know if u need to know anything else.

 

RJ

0 Kudos
Message 4 of 12
(3,392 Views)

 


@Rishabh wrote:

Hi All,

 

I m sry for the scanty Info. My PSU is HP6260B.


How old is that supply? Was it around during the Dark Ages?

 

 

 


And the programmable Resistor is an AD5248 (http://www.analog.com/static/imported-files/data_sheets/AD5243_5248.pdf).

 

Well, you'll need to do some I2C programming then. You can:

  • use the NI-8451 or get a third-party product. You can perform a search for I2C on the forums and you will come across various suggested alternatives.
  • use one the cards you have to perform "bit-banging" - this means that you'd generate the I2C communication stream by programming the digital I/O on one of your cards. The PXI 6251 that you have has digital I/O so you could use that. You would need to create the clock and data streams yourself according to the I2C spec and the details in the pot's datasheet. I would suggest starting by looking at the DAQmx examples - there's several examples there dealing with digital I/O. Start by creating some simple patterns and then work your way up.

Given your situation I think the 8451 will be the cheapest solution for you in terms of man-hours.

 

0 Kudos
Message 5 of 12
(3,372 Views)

The spec sheet for the PXI-6251 says that the digital port supports pattern I/O.  So it can do I2C.  But you will have to write the I2C code yourself, and it is not trivial.  If you used the NI-8451, as Smercurio suggestd, you would not have to write the software, but instead you could use the NI drivers that already support the I2C protocol.  This makes the programming very simple.  Believe me, I've done it both ways.  I'll take the NI-8451 any day.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 12
(3,360 Views)

Thank you for all ur support Guys!!

 

I had an idea, which I thought I'd like to discuss with u!!

 

If I make a Decimal to Binary Converter and then use The DAQ assistant to Generate every bit of the generated output sequentially while timing the While Loop sequence as per the Spec sheet, do u think that will work??

 

RJ

 

 

0 Kudos
Message 7 of 12
(3,350 Views)

Your 'idea' is exactly what tbob and smercurio were talking about doing if you don't use the 8451.

0 Kudos
Message 8 of 12
(3,338 Views)

I solved a similar problem once by using a cheap PIC micro-controller as a RS232 to SPI converter. In our case this was very cost effective. Because speed was not issue, and the task was simple. We could also use inhouse competance and equipment.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 12
(3,330 Views)

The PXI-6251 supports pattern I/O.  Do you know what pattern I/O is?  You create patterns into waveforms and send the waveforms using the PXI-6251 Digital Out ports.  The real trick is to create the proper pattern for SCK and SDA to send an address/command in the proper order with the proper timing, and then to create SCK, tri-state SDA in order to read the data coming back.  This is not at all trivial.  It is very complex.  You need very good Labview skills in order to do this.  I would not recommend this approach for a novice.

 

I've seen some SPI vi's created by NI that has all of this already coded.  You just supply the address and data.  I wonder if there are I2C drivers already written.  Does anyone know?

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 10 of 12
(3,316 Views)