Cómo funciona MAX? IMAQ serial write

Hola buenos días, llevo tiempo intentando averiguar cosas sobre la comunicación de una tarjeta PCIe 1433 y una cámara mikrotron 1462. La cosa esq através del icd file y el MAX he conseguido que cambiando parámetros en el MAX cambie el modo de adquisición, ya que envía dichos comandos a la camara y configura los atributos para la tarjeta de adquisición.
Para cambiar los parámetros de la cámara, desde el programa de LabView , estaba utilizando el IMAQ Serial Write. Para cambiar las ganacias y ciertos parámetros funciona a la perfección en tiempo de ejecución, incluso cuando la adquisición está en funcionamiento. Pero si envío los comando de cambiar el modo de adquisicion de la cámara (Los Taps X Bits), la tarjeta parece no enterarse del cambio y no funciona bien. Asi q lo intenté con el IMAQ Set Camera Atribute, lo que pasa esq esta opción no me deja aplicarla en tiempo de ejecución y debería cerrar la sesión de IMAQ, setear los nuevos atributos y crear una nueva. Ya que todos los demás se pueden cambiar, y el MAX aparentemente lo hace, me preguntaba si hay una manera de hacerlo sin crear una nueva sesión de IMAQ e alguna manera que no estoy teniendo en cuenta, o el propio Max cuando se produce un cambio de los atributos cierra y genera una nueva sesion de Imaq de manera transparente al usuario.
Gracias!

Ay, perdona, que puse el modelo mal!!
Pues el icd file lo generé a partir de un modelo antiguo que funcionaba para esta cámara, que está en la página web de NI (El MC 1310), y con el file generator me cree uno con los atributos que necesitaba, xa ver la estructura que creaba y fijándome en files de otras cámaras (Contenidos en la carpeta Dat), fui probándo como se le añadian las opciones para enviar los parámetros. Vamos autodidacta total, porque los icd files son los grandes desconocidos. 
Adjunto mi icd file actual. En el cual se soportan todos los modos de la cámara (taps * bits) menos uno (16 tap 1 bit), una opción para aplicar una corrección, bining.. Y algún parámetro más. Y están definidos el resto de parámetros pero no envía el comando adecuado, porque no sé como definirlo.
El comando en sí depende del valor que le llega y no sé como recogerlo en el icd file. Por ejemplo, para cambiar la ganancia, si el nuevo valor es 400h el comando sería 400h, en el icd file se defininen los comandos de la siguiente manera:
Action (Serial) {
               Command (400)
En este caso sería Valor y no sé como hacerlo para que recoja el valor q le llega y lo concatene al string del comando. Otro problema que me he encontrado es que creo q solo admite valores numéricos, y este comadno se envia en hexadecimal, por lo que es posible q contengan letras.
Gracias!
Attachments:
Mikotron MC 1360_Maite.zip ‏2 KB

Similar Messages

  • Using VI Example Basic Serial Write Read to send AT commands to Cell phone modem error 1073807360

    I am using the NI Example VI: Basic Serial Write and Read to send AT commands to a Cell phone acting as a Modem.  I can send AT commands to this phone using Hyperterm when I select the modem driver by name in the hypert port selection field but not as com 7 which it occupies according to device manager modem properties. The basic serial vi does not show the modem driver as a selection, only ports by comX are shown. I get error 1073807360.

    Have you tried to put the name you enter in Hyperterminal in the VISA resource control? If Com 7 doesn't show, you can simply type "COM 7" in the VISA resource control. Or use "ASRL::INSTR 7".
    Also, make sure the connection in hyperterminal is closed, before you open the port in LabVIEW.
    Hope it helps,
    Wiebe.

  • How does VISA serial write work?

    I am using LabView 6.0 and the VISA functions to run a distributed sensor network using RS-485 from a NT 4.0 machine.
    In order to work properly I have to manually control the RTS line which isn't a problem using the property node.
    Here's what I want to know.
    I'm using a sequence structure:
    I'm writing a command using VISA serial write
    Then in the next frame I unassert the RTS.
    Now in this setup does Labview pass the command to the serial port and then jump to the next frame in the sequence, or is there some kind of acknowledgment from the serial port that its done so the Write vi knows to finish, or am I running a the risk of cutting off my communication before I've finished or should I put in a short wait after the write to port
    , or could this cause me to miss the reply?

    Robert:
    With the default settings, VISA Write will not return until the data has been at least posted into the hardware FIFO. To be 100% sure that the data has been transmitted over the wire, you should do these 2 things:
    1) Call VISA Flush I/O Buffer with a mask of 32. This will ensure the data has been at least posted into the hardware FIFO, regardless of which settings are being used.
    2) Wait a tiny amount of time for the FIFO to be emptied. This is based on the number of bytes in the FIFO and the baud rate. For example, with a 64 byte UART FIFO and 9600 baud, you should wait 67 milliseconds.
    Dan Mondrik
    Senior Software Engineer, NI-VISA
    National Instruments

  • Merge a intensity graph to a Serial write/read

    Hey.
    I am doing my bachelor in Labview, and are using a arduino 2560 as a microcontroller for a thermal sensor.
    After many attempts on connecting the arduino to labview using LIFA.BASE I get connection sometimes, and sometimes not.
    I tried the Serial write and read program on the forum, and got much better reliability.
    I would like to use VISA, instead of Arduino int.vi
    I was hoping I could change the Serial write and read(removing the string) with putting an intensity graph in it?
    I have added the bachelor program along with the Serial write and read, can someone please help me??
    Attachments:
    bachelor_2013.vi ‏259 KB
    Modded Advanced Serial Write and Read_test.vi ‏40 KB

    There is the Simple Serial Write Read example.  That should get you started with talking over a serial port with VISA.
    It seems like you have an array of bytes that you need to send.  You just use the Byte Array To String to convert directly into a string and send it.  For reading, there is the String To Byte Array that you can use to start parsing your data.
    Show us what you have so far.  Be sure to include any sample data you may have and expected results.  Things get really confusing when stating ASCII and Hex since people can interpret that in 10 different ways.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is this "OK"? Lots of Serial Write.vi's !

    Hello all. I had a recent post and two excellent responses about how to get a constant FALSE condition to send a command ONCE, and a constant TRUE condition to send a command ONCE. In other words, while the buttons are "idle", nothing is being sent. The attached VI works great, but look at all the Serial Write.vi's! It doesn't really bother me, but is it just seems wrong. Are all those vi's "doing something" while they sit there in the case structure? Is there a way to get ONE Serial Write vi outside of the cases? Or should I care?
    background: In my other applications, the hardware has a FIFO and memory and I can concatenate lots of strings and send them to ONE Serial Write vi. In my new application, it's paramo
    unt to send ONE command and stop, hence the imbedded case structure and shift register to tell that a key has been pressed. The other attached vi is an example of what works on my old hardware but not the new stuff, so you can get an idea of why the new program seems so fat.
    Richard
    Attachments:
    WriteOnce.vi ‏58 KB
    ABSsub_VL&P.vi ‏91 KB

    If you want to use a single serial write, you can programmatically build your device dependent data string. See attached.
    P.S. What a great user profile name. Wish I had thought of it.
    Attachments:
    build_ser_string_programmatically.vi ‏37 KB

  • PDA (Pocke PC) - Serial Write Timeout

    Hello List,
    I am developing serial routines to communicate with external hardware. In many cases, XON/XOFF flow control is used.
    I have configured my PDA device to write out a large file. During the transmission, I use my development computer to monitor the transmission. During the transmission, I can send XON/XOFF characters to the PDA. If I send an XOFF, it will "pause" until I send an XON character. It works great unless I wait for more than about 3 seconds. If the PDA is forced to wait for more than 3 seconds, the transmission is terminated with an error. However, if I send an XON character, before the 3 seconds delay, it continues the transmission and no error occurs.
    It seems that a 3 second timeout is being enf
    orced within the routines but I have not been able to determine if I have control (within the PDA Serial Routines) over the timeout variable. Personally, I would like the timeout to be indefinite unless I want to enforce one.
    FYI: Based on industrial experience, for very large files, delays during the transmission of several minutes may be necessary.
    TIA,
    Guy

    Hello,
    I apologize for the delay in responding to your post. You are having a timeout issue when using software flow control (XON/XOFF) to transfer data between a PDA and a host computer, right? Are you getting error code 7 when the PDA times out? I was able to duplicate this issue here. This error code is a timeout error and it means that not all bytes have been sent. I spoke with members of the R&D team and they know about the problem. While they were unable to offer a formal solution at this time, they did provide a workaround which I hope works for you.
    Put a while loop around the serial write VI on the PDA.
    Continue the while loop until there is no longer an error code 7 (i.e. until all bytes have been sent).
    Essentially, this will ignore the repeated timeouts from the serial write VI. You can manually add a timeout mechanism by obtaining the time before the loop and checking it during the loop. However, you mention an infinite timeout is acceptable in which case no additional code is necessary.
    I have attached a couple of VIs that implement serial communication using XON/XOFF flow control and that use the above workaround. Please let me know if this solution works for you. If not, can you provide some additional details such as the error code and if the timeout is happening on the PC side or the PDA.
    Happy coding,
    Grant M.
    National Instruments
    Attachments:
    Serial_XonXoff_(Host).vi ‏55 KB
    Serial_XonXoff_(PDA).vi ‏68 KB

  • Visa serial write

    i need to connect my electronic hardware/instrument with labview serial visa. i need to enter multiple entries as input like frequencies, data patterns in binaries. but labview serial write accepts only single string as input. pls suggest how should i proceed?

    It really depends on the command format your instrument wants.  Some instruments will let you insert a semicolon between commands and write the one long string.  Others will require separate writes.  I would use a FOR loop in this case (iterate on an array of strings).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Strange serial write problem in labview 8.5

    I'm having a very strange problem with simple serial port write in labview. I'm running the 'Advanced serial write and read.vi' program from NI examples. I connected a microcontroller board on the device side. The board has been programmed simply to blink an LED fixed number of times. For example if I want my LED to blink 13 times, that is specified in the labview 'string to write'  field. I ran the program in hyperterminal window. It runs successfully. But whenever I'm running it in labview it is giving strange response, for example if I give input in 'string to write' field 18/13/15, it blinks 11 times, similarly if I try to run it 21/26/29 times every time it runs 22 times. That is the controller only acknowledges the MSB and duplicates the other bit with it. Since it is running fine in window's hyperterminal, There must be some adjustment need to be done in labview. And that I cannot figure out. Please anybody give some solution.Any suggestion is appreciated.
    With Regards,
    Tapabrata

    Please post your program or a stripped down version (we probably do not need all the signal processing) which shows the problem.  Make sure that all the controls for the serial port are set to your default values. Also, provide the exact communication protocol you are using.
    When you say you want to write in "real time," please specify what you mean. That term is used in several different ways and is often misinterpretted as a result. How often do you wnat to write? How much timing jitter or error can you tolerate?
    Most likely what you want can be done, but without seeing the code it is difficult to say what might be wrong.
    Lynn

  • LV5 serial write.vi vs hypertermi​nal difference​?

    I have a rs232c stepper motor controller connected to a PC running
    NT4. I have
    full control of the device (read and write) when using the
    hyperterminal program (comes with NT4)
    and everything work fine.
    Without changing anything except running Labview<->Serial.vi from the
    LV5 distribution
    disk, I was only able to listen (serial read.vi ) to the device but
    not controlling it. It appears
    that ascii commands sent (serial write.vi) are ignore by the device,
    while the same ascii commands sent via hyperterminal are accepted.
    What are the likely reasons for this? The port parameters appears to
    be OK because
    I was able to read from it.
    TIA.

    Thank you. That solved the problem.
    > I think hyperterminal adds the EOL(end of line) itself, and in serial
    > write vi YOU must add it, try putting a LF and/or a CR in the string
    > you write, and everything should work.
    > Hope this helps

  • How to select two strings and send to a serial write using case loop

    I had a serial write which have to take different commands at different cases. The same serial read should read both. How can I do it. Means if I have a string 500\r\nZ. I one case it should be -500\r\n Zand other case +500\r\n Z. But boyh of these cases have to be read with one serail write . How can I do iit . Please help
    Solved!
    Go to Solution.

    You can't gaurantee that both conditions won't hit at the same time.  You will need to send a separate command for each condition.
    Plus, using EQUALS on floating points is dangerous.  You might never get the condition because a really low bit could be off.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Enviar Float mediante Serial Write

    Hola:
    Cual sería la mejor manera de enviar un array de doubles por puerto serie desde Labview ?. Serial Write necesita enviar strings de 8 bits por lo que habría que hacer una conversion de float a int, y luego dividir en grupos de 8 bits ?

    Hola,
            Un float (SGL) son 32 bits (4bytes) y un double (DBL) son 64 bits (8bytes) Estándar IEEE 754
            En un String cada caracter es la representación ASCII de un byte de información.
            Puedes usar la función "Flatten to String" para convertir el arreglo a string y enviarlo por el puerto serial, si dejas el valor por defecto de "prepend array or string size? (T)" se agregan 4 bytes adicionales asociados a la cantidad de elementos en el arreglo, si colocas esa opción en False obtienes el mismo resultado que usar un typecast.
            Del lado de la recepción lo recomendable es que sepas cuantos bytes tienes que leer antes de hacer la reconversión.
    Saludos,
    Luis A. Mata C.
    Ing. Electrónico
    Anaco - Venezuela

  • Inconsistent serial write

    hello,
    I'll be brief. I'm a novice, still trying to get the feel of labview. Somehow there's an inconsistency of the serialwrite.vi in my program. Using a protocol analyzer, I could see that sometimes the serial write doesn't send all the strings in the command text box. (For instance, the value of the command textbox is "send 200", and sometimes the serial write only sends "se"). I followed the guideline for serial communication: initialize (baud = 9600, databits = 8, stopbits = 2, parity = none), flush the buffer before writing to the serial port, send the string to the port, have a serial port break to wait for response, and count the number of bytes on the serial port before reading them. I use R-232, and I also have checked the "updat
    e value while typing" on the pop up menu of the command textbox. My program is attached. I will appreciate any help in any way. Thank you!!

    Try using VISA instead of serial VIs. VISA is lot better to use in almost everyway. There is a VI on your computer ( that has Labview on it )named, serial communication.vi That VI will help you understand the use of VISA in serial communication. But for some reason if you have to use Serial VIs then attach your VI on this developer exchange and I will try to troubleshoot the problem.

  • Serial Write - 8Mb file to write. Write command can only do 256 Bytes at a time. How to split up?

    First, thanks for this resource. I've used this forum quite a bit as a "lurker" and it's gotten me this far. Hoping to learn a bit, so I can contribute
    Anyway, my issue is this:
    I am ultimately trying to write an 8Mb binary file to an 8Mb Serial Flash device via the Total Phase Aardvark. The writes to the flash device I am using are limited to 256 bytes per write command. The vi program attached is capable of writing 256 bytes at a time, but not anything more. I realize I need to incorporate some sort of "For Loop" (and I understand that I'd want to do it =(File Size)/256 interations, but I can't seem to figure out how.
    Does anyone have any quick advice to drive me in the right direction?
    Thank you!
    Attachments:
    Aardvark bin test 02.vi ‏33 KB

    Well, you seem to have answered your own question, so it's not clear what your specific issue is. Is it how to extract 256 bytes at a time?
    As for the code... umm... I'm not entirely sure what you're trying to accomplish with the whole top half of your code, but it seems to me that almost the whole thing can be replaced by a single call to the Read Binary File function. What is the format of these binary files?

  • CRio 9014, 9116 and 9870 - serial write not working

    Hi,
    I am trying to read string from the text file and write to the serial port on 9870. The string are being read fine, they are getting in the Write_FIFO, the wait on IRQ passes all the bytes to the serial port. BUT I am struck, because there is nothing coming out of the serial port. I tried using scope to see if there is any signal, but there was not any. I have attached the FPGA and Host side of the program for any quick suggestions.
    Can some body please help? I will appreciate it a lot.
    Thanks,
    Ajay
    Solved!
    Go to Solution.
    Attachments:
    FPGA.VI.jpg ‏146 KB
    Host_1.jpg ‏111 KB
    Host_2.jpg ‏134 KB

    Hi,
    I talked to an NI help, and they suggested to try and work out the serial loopback example. I tried to implement that and at the end of the run, the execution drops no errors but i do see the timed out indicator going true for the read part of the program. I have tried everything i know of, I will appreciate any help. I have attached the FPGA and host programs if anybody wants to check it. The digital output channels were used just see if the sequence structure runs, and it does run fine.
    Thanks,
    Ajay
    Attachments:
    9870 Loopback DMA-FPGA.vi ‏81 KB
    Serial Loopback DMA-Host.vi ‏525 KB

  • Sending data through a serial write box (vision processing)

    Hi there, I am fairly new to labview and vision assistant. I was wondering if I could get some assistance on a particular problem we are having with our project. The idea is that we will use a webcamera to analyze a continuous loop of images and identify shapes, then send the data through the serial port to a controller which uses the mint motion language. The problem we are having is we cant sind a way to send the data we are getting from particle analysis to the serial port. Is there any way we can do this? I would be eternally grateful for any kind of pointers!
    I will attach the write to box we are using right now as well as the program itself
    Attachments:
    bild.vi ‏104 KB
    SKRIV2BOX.VI ‏31 KB

    What you are searching for are the functions "Flatten To String" and "Unflatten from String".
    Attachments:
    FlattenToString - UnflattenFromString.vi ‏16 KB

Maybe you are looking for

  • Error when I deployed the java EAR application in NWDS 7.1

    HI All, I got the  error when I deployed the java EAR application in NWDS 7.1 version..help me out........................................... com.sap.ide.eclipse.deployer.api.APIException: DeployException,cause=[ERROR CODE DPL.DCAPI.1023] Authorizati

  • Baseline Date as the Document Date

    Hi, I have a query on Payment Terms which we maintain in the Posting Parameters->Postings Tab page in RE-FX Lease Out Contract. I maintain a payment term for 10 days in the RE-FX Contract. I have maintained a Condition which is due on 1st of every mo

  • Disk repair procedure?

    Hi, I'm hoping someone can advise on the best course of action with repairing my Mac Pros second drive or at least the best way to save the data. I have a two hard disks. The first is the original 1TB western digital boot disk. The second  is a newer

  • Where is the attachment panel and page option in Designer?

    In the document properties (in Acrobat), initial view tab and Navigation tab option you can select Attachments Panels and Page. Can this be done is Designer can not seem to find a similar option. Regards, John.

  • Bookmarks in Safari: do they ALL have to be synced?

    I currently use Firefox as my primary browser and use (Obviously) Safari to sync bookmarks on my iPhone. I'd sort of like to start using Safari as my primary browser (having problems with FF), but I don't want ALL of my gazillion bookmarks syncing on