Trigger oscillosco​pe on specific I2C write?

Apologies for cross posting this from the Automotive and Embedded forum but there just doesn't seem to be much "traffic" there (no pun intended) I did a search and only found about four posts that even mention I2C. Most are about CAN.
My only experience with hardware and LabVIEW is controlling instruments using visa. I have an I2C problem I am trying to debug and maybe someone knows if NI makes hardware that will work for me.
I want to trigger an oscilloscope on an I2C write to a specific 24C32 EEPROM address so I can look at the waveform preceding that. Could one of the DAQ cards do this and would I need LV Real Time?
I have a Total Phase I2C monitor and I can log the transactions. But some of the transactions are corrupt and there are mysterious erroneous writes to a few different EEPROM memory locations. Interestingly it writes the address of the I2C device to these locations. So I need to look at the waveform immediately preceding one of these unexplained writes.
Maybe the DAQ card can be the scope if I use analog inputs. If I capture the clock and data is there a vi that already exists that will decode the bit stream?
The way I might go about this is with a PIC microcontroller. I can write a program for that which I can send commands to through LabVIEW. I could tell the PIC to make a digital line go high when it sees a particular bit stream and use that to trigger the scope.
What would you do?
=====================
LabVIEW 2012

On a specific write
That makes it more challenging and could be a pile of work used just one time.
A continuous acq at a high rate to catch the issue then go back through it manually can get you there but a lot of manual scrolling and decyphering.
I think there are some FPGA examples available that support low levl protocols. You may be able to start with there work, not sure.
I'll process this challeng in the background and if I have more ideas I'll share.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • Trigger oscillosco​pe on specific write to I2C EEPROM?

    My only experience with hardware and LabVIEW is controlling instruments using visa. I have an I2C problem I am trying to debug and maybe someone knows if NI makes hardware that will work for me.
    I want to trigger an oscilloscope on an I2C write to a specific 24C32 EEPROM address so I can look at the activity preceding that. Could one of the DAQ cards do this and would I need LV Real Time?
    I have a Total Phase I2C monitor and I can log the transactions. But some of the transactions are corrupt and there are mysterious erroneous writes to a few different EEPROM memory locations. Interestingly it writes the address of the I2C device to these locations. So I need to look at the waveform immediately preceding one of these unexplained writes.
    Maybe the DAQ card can be the scope if I use analog inputs. If I capture the clock and data is there a vi that already exists that will decode the bit stream?
    The way I might go about this is with a PIC microcontroller. I can write a program for that which I can send commands to through LabVIEW. I could tell the PIC to make a digital line go high when it sees a particular bit stream and use that to trigger the scope.
    =====================
    LabVIEW 2012

    Please use the forum post located here.
    Kareem W.
    National Instruments
    Web Product Manager

  • I2C Write/Read Error

    Error -301742 occurred at NI-845x I2C Write Read.vi
    "Possible reason(s):NI-845x:  The slave did not acknowledge an address+direction byte transmitted by the I2C master. Reasons include the incorrect address set in the I2C configuration or the incorrect use of the 7-bit address. When entering an address to access a 7-bit device, do not include the direction bit. The NI-845x Basic I2C API internally sets the direction bit to the correct value, depending on the function (write or read). If your datasheet specfies the 7-bit device address as a byte, discard the direction bit (bit 0) and right-shift the byte value by one to create the 7-bit address."
    We have connected the pull up resistors on the SDA and SCL line.
    The error seems to be strange in our case,
    We have two setup
    1. Using a push button to power the device and wires through the pull up resistor.
    2. We are trying to communicate using a NI 2569 for the SDA and SLC and the Power supply to the device.
    We do not observe the error in case 1,however, in case 2 we do observe,attached are the waveform pics for the same.
    Noted that we have the clock signal rise delay in case 2, is this because of the relay 2569?
    Any help will be highly appreciated.
    Regards,
    Naru 
    Attachments:
    Case 1.jpg ‏302 KB
    Case 2.jpg ‏302 KB

    I don't quite understand your setup, and I'm not sure what I'm looking at with the figures you posted. What does the 2569 have to do with the 8451? You also said
    1. Using a push button to power the device and wires through the pull up resistor.
    I have no idea what this means.
    It's hard to tell from the pictures, but for the Case 1 figure, it appears that you are generating a correct start condition. It's also indicating that are sending a read transaction. You didn't indicate what device you're talking to, so we can't say for sure if this is correct. 
    In the second case it also appears that you generating a correct start condition. The slow rise times that you are seeing in the clock is probably due to extra capacitance on the bus, or weak pullups, or both. This transaction appears to be a write transaction, but with no data.
    At this point, without knowing what device you're talking to, a better explanation of your setup, and the code itself, I'm not sure how much help we can be. 

  • How to trigger so action when ServerletOuput stream writes all data as byte

    Hi ,
    I have a servlet which accepts the index , size of a .3gp file in bytes as input parameters.
    If index=0 ...i am reading whole file into buffered input streame and writing to client as Servlet output steam as bytes.
    If index !=0 , or index=100 ...say suppose
    im ommiting first 100 bytes and rading101 byte to till the end of file in to buffered input streame and writing to client as Servlet output steam as bytes.
    Here i would like to trigger some action when the servlet writes entire bytes to the client .
    But im not able to notify exactly when the connection can close between client and server.
    Can any one help me to overcome this.
    Thanks in advance.

    Hi ,
    Thanks for reply..
    But reallu i couldnt get you.
    please go though the code snippet i have...and suggest me.
    try{
    File fFile = new File (fileName);
    BufferedInputStream bif = new BufferedInputStream(new FileInputStream(fFile));
         bif.skip(Integer.parseInt(((DownloadFileForm)o).getIndex()));
    int byteSize = (bif.available() < Integer.parseInt(((DownloadFileForm)o).getSize())) ? bif.available() : Integer.parseInt(((DownloadFileForm)o).getSize());
    byte[] b = new byte[byteSize];
    bif.read(b, 0, byteSize);
    sosStream = response.getOutputStream();
    sosStream.write(b);
    // here i have to do something
    sosStream.close();
    logger.info("file has been downloaded from Server is sending out to client");
    }catch(Exception e)
    // e.printStackTrace();
    logger.info("Exception :"+e.toString());
    regards,

  • I2C Write.vi

    Labview 8.0 and Windows 2000. I am using NI-8451 USB to I2C Converter
    and the I2C Write.vi and I2C Read.vi. My question is how do you tell
    these vi's what address to start at? The vi's have no inputs for
    address. They have inputs for number of bytes and input data but no
    input for start address.
    Thanks for your help.

    Hi Iec,
    You need to use the Create Configuration Reference vi first, then use the Configuration Property node to set the address, address size, and clock rate.  There are two examples that do a basic read and write in the example finder.  Just go to Help > Find Examples, then Browse to Hardware Input and Output > I2C and SPI > I2C Basic.
    In this folder are a basic read and basic write example that would be a great point of reference for you.  There is also more information in the NI-845x Software User Manual and the NI-845x API Help.
    Hope this helps!
    Adam W
    Applications Engineering

  • Need help - I2C write/read with TAOS TCS3414 light sensor using USB-8451

    Hello, I'm new to labview and need help setting up a vi that will allow me to communicate with a digital light sensor (TAOS TCS3414) using a USB-8451. I need to use the sensor to measure light from a light source that I designed and built as part of a project im working on. I've tried looking at several labview I2C exampled but find them to be very confusing. I've used an arduino to interface with the sensor successfully but need to use labview and dont understand how to write the program. The actions are simple; I need initialize the sensor with a simple command and then request data from 8 data registers and then read that data. The data will then be used in further calculations. The portion i need help with is writing and reading from the sensor. I've attached the datasheet for the sensor as a guide. I can also provide the arduino code that i use to read data from the sensor if that would help. 
    Pleae keep in mind that i am completely new to labVIEW. I really do want to learn from this but need quick results so the more help the better. It would greately appreciate any help or explaination. 
    Attachments:
    TCS3414_Datasheet_EN_v1.pdf ‏1806 KB

    Hi Aaron,
    Here you go, this is made with a USB-8452.
    When you run the code tick the power en dac enable box on.
    Maybe you can help me with my problem, I want to use a fiber to sense light from a led.
    Do you use any fiber hardware with the TCS3414?
    gr,
    Attachments:
    TCS3414.vi ‏63 KB

  • Best way to chain several I2C write / read cycles

    Hi,
    I'm developing a custom sensor that communicates over I2C with the NXT.
    I need to perform sequencially several read / write actions over I2C.
    I know that the NXT toolkit is limited to only one frame sequences and that is possible to chain them with "pink NXT wires" or "any other wire".
    I've tried several times but I only get the first frame working. The other aren't executed.
    Does anyone here has enough experience or advices to perform several I2C operations sequencially in the same VI.
    Many thanks in advance.

    What version of LabVIEW / NXT Module are you using?
    The most recent LVLM supports multi-frame stacked sequences.
    Take a look at the ultrasonic sensor block diagram, it has a configure step followed by actually reading the data.
    One problem can be trying to read/write the i2c channel too fast. You may need to insert some arbitrary wait times in between sequential i2c calls.
    If you post your code it might be easier to tell whats not working.

  • [SOLVED] After post trigger go to the specific item. (Oracle Forms 10g)

    I have this layout
    http://img339.imageshack.us/img339/975/capturetbo.png
    and a post trigger insert and update
                    IF  :item1 IS NULL
              AND :item3 IS NOT NULL THEN
                        alert_id := FIND_ALERT('blank_alert');
                        SET_ALERT_PROPERTY(alert_id,ALERT_MESSAGE_TEXT,'Item3 must have a value.');
                        v_alert := SHOW_ALERT(alert_id);          
                        RAISE Form_trigger_Failure;
              END IF;My problem was as it fires, the cursor will be on the item1.
    I've already use
    SET_ITEM_INSTANCE_PROPERTY
    NEXT_ITEM
    GO_ITEMbut it was all illegal. The cursor must be in the item3.
    Don't question me why I do not set the item3 to required and why post triggers.
    It is just that. It is the requirement.
    Any bright Idea? Thanks!
    And even when-validate-item triggers. It must be post triggers.
    Is it possible? Thanks.
    Edited by: reppihsrow on Feb 19, 2013 6:02 PM

    POST-TRIGGER
    DECLARE
    timer_id                       TIMER;
    one_second                       NUMBER := 1000;
    BEGIN
    <validations . . .>
    timer_id := CREATE_TIMER('timer', one_second,NO_REPEAT);
    END;WHEN-TIMER-EXPIRED
    GO-ITEMBright idea! Million thanks!
    Note: I have an typo error in my code. It should be
    IF  :item3 IS NULL
              AND :item1 IS NOT NULL THENAgain. Thanks!

  • Idoc trigger for inventory updates.

    Hi ,
    we want to send our inventory update for a specific storage type to a third party system. when ever  the quantity in a particular bins of the storage type gets updated an IDoc should e created to send the remaining quantity to a third party system. the triggers include any goods movements (PGI, goods issues, goods receipts). So my question is where do I write the trigger. Do i have to write the trigger against each transaction that will impact in goods movements or is there any way that I could write it at a higher level  so every goods movement thats happening in the SAP system will check whether it has to create an IDOC or not.

    what happens if I use MB1A, MB1B, MB1C?
    what happens if I dont post material document and just perform bin to bin transfer.
    I want the the Inventoy level at a particular bin when ever there is a change to in the quantity.
    how can I achieve this??
    Edited by: deepu p on Mar 17, 2011 2:18 PM

  • After insert trigger issue

    Hi All,
    Can I have an after insert trigger on a table wherein the execution is also on the same table?
    It's like 10 columns in the table A.
    During a new row insertion, except one specific column(say 'J'), remaining all getting data.
    Now 'after insert', need to update the data of the column J based on one inserted value for column say ID.
    Code goes like below:
    CREATE OR REPLACE TRIGGER UPDATE_J
    AFTER INSERT ON A REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    begin
    if :new.ID = 'N%' then
         :new.J:= 'N';
    else
         :new.J:= 'M';
    end if;
    end;
    Below is the error when I tried to execute that.
    ORA-04091: table string.string is mutating, trigger/function may not see it
    Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.
    Action: Rewrite the trigger (or function) so it does not read that table.
    Any idea to resolve?
    Regards,
    Seetharaman.

    Hi,
    The docs say
    Restrictions on AFTER
          An AFTER row trigger or AFTER row section of a compound trigger can only read but not write into the :OLD or :NEW fields. When faced with problems like this, it is always a good thing to consult the documentation.
    Regards
    Peter

  • How can i find 8451 & I2C example code.(Labview 7.1)

    How can i find 8451 & I2C example code.(Labview 7.1)
    ! will have to commuicate Data Read and Write
    (USB-8451 &  I2C(ST24C16) direct connection status)
    I want to Detail text and VI Example.
    Thank you.
    [ps] [email protected]

    If you installed the NI-845x driver, it should have installed in LabVIEW examples in the Example Finder. These will be configured for the 8451 but not necessarily your specific I2C device. The examples are located in the Hardware Input and Output»I2C and SPI folder in the Browse view of the Example Finder. I hope this helps!
    Regards,
    Missy S.
    Calibration Engineer
    National Instruments

  • Trigger ai reading ctr0 ctr1

    I have an E series board.
    Problem description:
    I want to set a pulse on ctr0 this pulse triggers a puls on ctr1 with a specified delay, and puls on ctr1 triggers reading of ai channel.
    I wil implement this with DAQmx in Ansi C, but I have resource problems on the board.
    Is there a solution to perform an ai measurement with a specific delay after pulse on ctr0.

    This is the nidaq code I have this must be converted to NIDAQmx is this possible
    // reset counter1
    GPCTR_Control(iDevice, ND_COUNTER_1, ND_RESET);
    // use counter 1 as puls generator to trigger counter 0
    GPCTR_Set_Application(iDevice, ND_COUNTER_1, ND_SINGLE_PULSE_GNR);
    // write delay counter1, note this delay is not used.
    GPCTR_Change_Parameter(iDevice, ND_COUNTER_1, ND_COUNT_1,ulLOWcount);
    // write pulse length counter1
    GPCTR_Change_Parameter(iDevice, ND_COUNTER_1, ND_COUNT_2,ulHIGHcount);
    // set gpctr0 as output channel of pulse of counter1
    // To output a counter pulse, you must call Select_Signal.
    Select_Signal(iDevice, ND_GPCTR0_OUTPUT, ND_GPCTR0_OUTPUT, ND_LOW_TO_HIGH);
    // reset counter2
    GPCTR_Control(iDevice, ND_COUNTER_0, ND_RESET);
    // use counter as triggered puls generator1
    GPCTR_Set_Application(iDevice, ND_COUNTER_0,ND_SINGLE_TRIG_PULSE_GNR);
    // set channel other counter output to be used as trigger
    GPCTR_Change_Parameter(iDevice, ND_COUNTER_0, ND_GATE,ND_OTHER_GPCTR_OUTPUT);
    // write delay after external trigger
    GPCTR_Change_Parameter(iDevice, ND_COUNTER_0, ND_COUNT_1,ulLOWcount2);
    // write pulse length
    GPCTR_Change_Parameter(iDevice, ND_COUNTER_0, ND_COUNT_2,ulHIGHcount2);
    // set gpctr1 as output channel of pulse of counter2
    // To output a counter pulse, you must call Select_Signal.
    Select_Signal(iDevice, ND_GPCTR1_OUTPUT, ND_GPCTR1_OUTPUT, ND_LOW_TO_HIGH);
    // arm counter2 (delay counter)
    GPCTR_Control(iDevice, ND_COUNTER_0, ND_PROGRAM);
    // program ADC to wait for trigger
    iStatus = DAQ_Config(iDevice,1,0);
    //Configure DAQ to look for Start Trigger from GPCTR1 Ouput routed via PFI_0 //ND_GPCTR1_OUTPUT
    iStatus = Select_Signal(iDevice,ND_IN_START_TRIGGER,ND_GPCTR0_OUTPUT, ND_LOW_TO_HIGH); // changed output to gate
    iStatus = DAQ_Start(iDevice,iChan,iGain,piBuffer,ulCount,ND_INTERNAL_1_MHZ,2);
    // arm counter 1 (puls generator)
    iStatus = GPCTR_Control(iDevice, ND_COUNTER_1, ND_PROGRAM);
    while ((iDAQstopped != 1) && (iStatus == 0)) {
    iStatus = DAQ_Check(iDevice, &iDAQstopped, &ulRetrieved);
    iStatus = DAQ_VScale(iDevice, 1, iGain, dGainAdjust, dOffset,ulCount, piBuffer, pdVoltBuffer);
    // CLEANUP - Don't check for errors on purpose.
    iStatus = DAQ_Clear(iDevice);
    iStatus = GPCTR_Control(iDevice, ND_COUNTER_1, ND_RESET);
    iStatus = GPCTR_Control(iDevice, ND_COUNTER_0, ND_RESET);

  • Update of write optimized DSO by csv file

    Hi Gurus,
    I have observed few things while trying to upload a write optimized (WO) DSO from a flat file in BI 7.0. The data flow is as follows:
    data source -> transformation -> data target (DSO - WO).
    from a test perspective, i have updated 5 records till PSA with IPAK and subsequently updated it to the DSO using DTP. When i check the in the manage i found records transferred = 5 and added = 5. which is okay.
    then i again updated the same 5 records to PSA, and triggered DTP. Now DTP brings 10 records (5 + 5). records transferred = 10 and updated = 10. when i checked in the header tab in DTP monitor i found the selection brings both the PSA request IDs.
    again i loaded the same 5 records to PSA, a new PSA request ID generated and DTP extracts this PSA id along with the old 2 already transferred. Now records transferred = 10 added = 15. why transferred 10 ? i am getting confused here. I was expecting it to follow the same way, then it should have transferred 15 and added 15. Ideally there is no routine which generates additional record. There for this is not possible at all. Anybody has observed this strange behaviour ?
    Why this is happening ? I was expecting it should only bring 5 records every time ? Is it something specific to write optimized DSO or am i doing something wrong here ? Is there any setting where i can set the parameter no to select the old PSA request that already updated to DSO ?
    Please clarify.
    Soumya
    Message was edited by:
            Soumya Mishra

    Is your DTP full or delta.
    Here is some interesting discussion.
    /thread/348238 [original link is broken]

  • How to retreive dynamicly  the name of  a trigger associated with a table

    Hi,
    Comming from Ms-Access and SQL Server, i use triggers (build by omwb) to get automaticaly a new value to primary keyes (during the insert phase).
    Is it possible to retreive by sql, schema... the name of a trigger associate to a specific col in a specific table ?
    Regards.

    Hi,
    Comming from Ms-Access and SQL Server, i use triggers (build by omwb) to get automaticaly a new value to primary keyes (during the insert phase).
    Is it possible to retreive by sql, schema... the name of a trigger associate to a specific col in a specific table ?
    Regards. For update triggers try this:
         select trigger_name from all_trigger_cols
         where
              table_owner = 'DEMO' and
              table_name = 'DEMO_BILLING' and
              column_name = 'PAID' and
              column_list = 'YES';
    For insert triggers you can refer to all_triggers.
    Regards,
    Robin.
    Robin Bothwell
    Software Developer
    Compuware/Numega
    1-800-462-7740x16609
    <http://www.compuware.com/products/devpartner/db/visualstudio.htm>

  • How to get the specific filename

    Hi..
    I want to get the specific file where the filename contains current date like "asd.11.20051226.03.dat". Then, i want to write the filename to a text file.
    Now, i only know how to get the list of file in a specific directory& write the whole list to a text file. How to filter the list of filename because they have "dot" in their name?

    To determine if a string contains a dot:I have a feeling that about 10 seconds after he figures out whether the filename contains a dot he's going to need to look a little deeper to determine whether he found wakka.wrongfile.txt or 11.20.1980.the.file.hes.looking.for.data. Maybe?

Maybe you are looking for