Jump to content

atokad

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by atokad

  1. 3 minutes ago, infinitenothing said:

    I assume you've configured the 9205 for single ended vs differential correctly?

    NI-9205.PNG

    3 minutes ago, infinitenothing said:

    Are you within the current spec of the 9264?

    If you are referring to the voltage, then yes.

    3 minutes ago, infinitenothing said:

    How are you connecting the modules? A cable or one of NI's breakout boards?

    Try and simplify things as much as possible. For example, use a battery as a voltage source directly to the input and disconnect the outputs to rule out loading issues.

    The modules are placed directly in the cRIO-9035's slots

  2. My NI-9264 voltage is outputting incorrectly, and I am not sure what the issue is.

    Here is what I am sending to the FPGA vi:

    FPGA_Reading.png

    The top circled number is the velocity of a mass flow controller that operates from 0-5V with a velocity range of 0-75 SCCM. Hence my conversion from actual velocity to voltage is to divide linearly by 15:

    FPGA_Code.png

     

    MultimeterReading.jpg

    Multimeter reading (Idk why it is side ways I cannot seem to rotate it)

    We are using a ribbon wire to connect the module to the Sierra Smart Trak C100 MFC so I'm not sure if that is the issue or if there is something else wrong

  3. On 6/30/2018 at 3:19 AM, ShaunR said:

    I think you will find your current VI will be insufficient for what you are trying to achieve

    Okay since that's the case I am working on a different method, by trying to combine the two examples of a low-level grab, and a low-level sequence.

    I'm trying to do it with a case structure to determine if the images need to be captured or not, it's kind of rough, but the general idea is here. Would this be a better method for what I'm trying to accomplish?

    True case:

    True Case.png

    False case:

    False Case.png

    Currently it is without the JSON formatting/TCP send, but that can be added once I get the acquisition correct.

  4. 18 hours ago, ShaunR said:

    Take a look at the producer/consumer. There is a project template when you create a "new" project.

    Which one would be better for my project figure one or figure two?

     

    I guess what I'm asking, is what would be the best way to implement the Producer/Consumer pattern with my current VI. Should I be constantly queuing the images in the producer loop? Also, would my dequeue element be placed inside or outside of my for loop in the consumer loop?

  5. Now I am running into the issue of duplicate images being stored, any suggestions on how to get rid of my race conditions?

    Timing Issue.png

    I think the two main issues are:

    1. The loops are being ran at different time intervals, which causes the images to not be captured at the correct times (see: time intervals array)
    2. The local variables might not be fast enough to keep up with how quickly the images are being captured

    There may be some other issues, but those are the only ones I can think of. How would I go about solving/minimizingthese problems

  6. I'm trying to send images from a camera connected to my cRIO to a Python script running on my computer. I'm storing the image data in a JSON format, and all of the data is being written correctly, but when I go to send it through the TCP functions, my JSON is getting cut-off about a third of the way through. Here is what the LabVIEW code looks like:

    ImageAcquisitionTCP.png

    and my Python script:

    import socket
    
    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server.bind(('', 3363))
    server.listen(3)
    
    while True:
        conn, addr = server.accept()
        cmnd = conn.recv(4)  # The default size of the command packet is 4 bytes
        print(cmnd)
        if 'CAPT' in str(cmnd):
            # Do the initialization action
            filename = input('Enter the file name: ' )
            filename = filename + '.json'
            with open(filename, 'wb') as f:  # open in binary mode
                data_len = int.from_bytes(conn.recv(4), 'big')  # find out how much data is waiting
                f.write(conn.recv(data_len))  # collect that much data
                f.close()
                print('File has been saved.')
    
    server.close()

    I think the error is coming from having to flatten the image to a string and then having it converted to bytes during the transmission control protocol, but I'm not sure how to fix that or work around the issue

    output.json

×
×
  • Create New...

Important Information

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