LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-8451 / Advananced example -

Hello,
While reviewing the code examples for the NI-8451 , I see scripting VI's references for writing scripts. How can locate the text (open) for review?
Regards,
0 Kudos
Message 1 of 14
(5,262 Views)

Hi, 

 

What example program are you reviewing and what specific vi's are you wanting information about?  Could you give more information about the script files you are trying to locate?  I would also recommend looking at the Using the National Instruments USB-8451 tutorial, it gives a good explanation of how to code SPI in LabVIEW. 

 

Regards,

Andy L.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 14
(5,236 Views)

Andy,

Thanks for your reply. I using version 7.1. I'm looking at C:\Program Files\National Instruments\LabVIEW 7.1\examples\ni845x\I2C\Advanced.llb Microchip 24c512 write. I hooked up a different EEPROM with a slight data format difference ,but was able to talk to the chip. I need to change the clock timing after the device address|R/W|register|data. I can do about 5 consecutive writes. After that the I think the setup time between address+n|data is to short.  What I've learn so far , that NI script is kinda code text base node you can modify as needed from the basic protocols.I need to customize all the SPI's and I2C's to meet our diverse product needs.

Regards,

Chuck

0 Kudos
Message 3 of 14
(5,230 Views)
Hi Chuck,

I suggest trying the advanced general example with the page size for your eeprom. 
Also could provide the data sheet for the EEProm you are using?

Regards,
Andy L.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 14
(5,168 Views)
Hi Andy,
I'm looking at the advanced I2C write VI.block diagram. It has a  function (ni845xI2cScriptWrite) that takes three parameter and can return a long data type value back . How can I add additional time between each byte as it is indexed to 128? Are this bytes stored into a buffer for output? How can you add a wait between sequenial reg.data blocks? where are this functions defined?
Chuck
 
 
0 Kudos
Message 5 of 14
(5,162 Views)
Hi Chuck,

A possible solution to allow you to place waits between each byte would be to write a script. This script could include a write command for every byte that you would like to write and then between each of these write commands place a script for a delay function. The delay function can only be in millisecond resolutions.

Could you please provide the manual or the data sheet for the EEPROM you are using?

Thank you very much.

Sarah S.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 14
(5,148 Views)
Sarah,
I have attached the data sheet for this part. I using the 1K 128 x 8.
0 Kudos
Message 7 of 14
(5,145 Views)
Chuck,

It seems this EEprom has no address you can write to. It starts always at 0. This conclusion is based upon the fact that I am unable to find any address configuration in the manual. The device has maximum 28 bytes and a page of 4.

Here is a modified piece of code from the example, which will write 128 bytes to the EEPROM and has a specific delay of 5 ms between the page writes. You can alter the value for the delay until the code functions properly.

Hope this is able to help out.

Sarah S.
Applications Engineering
National Instruments
0 Kudos
Message 8 of 14
(5,121 Views)
Chuck,

It seems this EEPROM has no address you can write to. It starts always at 0. This conclusion is based upon the fact that I am unable to find any address configuration in the manual. The device has maximum 28 bytes and a page of 4.

Here is a modified piece of code from the example, which will write 128 bytes to the EEPROM and has a specific delay of 5 ms between the page writes. You can alter the value for the delay until the code functions properly.

Hope this is able to help out.

Sarah S.
Applications Engineering
National Instruments
0 Kudos
Message 9 of 14
(5,120 Views)

Sarah,

I was unable to open one of the sub VI's. It is seaching in hp34401a. llb and hp34401u.llb libraries. I have those two llb's but not the subVI. See attached.

Thanks

Chuck

0 Kudos
Message 10 of 14
(5,115 Views)