Control Camera Attibutes through serial port using VISA commands

Hi there,
I'm using a Basler acA2000-340kc camera through an PCIe-1473R FPGA as frame grabber.
I would like to be able to configure the camera through the serial port just in LabView, not using a third-party as Pylon (which I can do now).
According to this forum post 
http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/My-Basler-acA2040-180km-NIR-is-not-visible-in...
this is possible just taking the VI posted here
https://decibel.ni.com/content/docs/DOC-5049
and converting from IMAQ to VISA, as RIO frame grabbers cannot use IMAQ. I have been trying to do this by changing the IMAQ vi to their VISA equivalents, but I have no good results.
Does anyone know which are the steps to go from that piece of code to one that can be used to control the camera in my case?
Thanks a lot,

Hi i.popa,
Basler makes the Basler Binary Protocol Library for serial communication with their cameras. If you make sure you're running the serial server section of your FPGA code to keep the serial port open, you should be able to use calls from this library to communicate with your camera. We have a community example with more information on using the Call Library Function Node to call a DLL. This DLL will take care of all the processes needed to write from and read to the registry, so this implementation will probably be similar to the example program you listed above, using calls to this library instead of the IMAQ Serial functions.
Good luck with your application!
Emily C
Applications Engineer
National Instruments

Similar Messages

  • LV acquire the print information from the embed board with Linux system through serial port

    I want to acquire the print information by LV from the embed board with Linux system through serial port, like the window hyperterminal tool?
    I try to use VISA serial config function to achieve it ,but lost and prompt that is error like attachment.
    I can't sure that my idea is reasonable.
    help me
    thanks a lot!

    I ended up finding the answer to my problem. After pointing a client directly at one of the DPS systems, I saw the following error in the logs:
    [27/Jul/2009:17:11:47 -0400] - OPERATION  - INFO  - conn=3688 op=4 BIND RESPONSE err=12 msg="The server is not configured to pass through control 1.3.6.1.4.1.42.2.27.8.5.1" etime=0After adding that control OID to the allowed-ldap-controls, I could login via password auth. Adding this control also allowed for password changes to work from a client system.

  • How to transfer file from PC to PC via serial port using labview

    I need to transfer files(.txt, .doc, .xls) from PC to PC via serial port using LabVIEW. Is it possible to transfer files, if so how to transfer?
    Solved!
    Go to Solution.

    Yes, it is possible to transfer files with the serial port using LabVIEW.  Files are just collections of bytes and the serial port is pretty good at shipping bytes from one PC to another.  You need to connect the serial ports together with a null modem cable.
    First, take a look at the example for serial communication.   In LabVIEW, go to the Help menu and select "Find Examples...".  From there you can search for "serial" or navigate to Hardware Input and Output >> Serial.  Select the "Basic Serial Write and Read.vi".  Experiment with that example to gain confidence on the serial communication methods.
    Next, it's time to learn about how to read and write files.  For that, the examples could be somewhat confusing since they all deal with files that are presumed to have data of a specific type in them.  I would recommend just getting familiar with the functions on the File I/O palette.  Specifically, get to know the following functions.
    Open/Create/Replace File - On your destination side, you'll need to create the copy of the file that you are trying to transfer
    Close File - When you are finished reading from or writing to a file, you should close it.  It cleans up the memory being used and finalizes any write operations that are still floating in the write buffer.
    Read From Binary File - The best way to read from a file when you do not really care what type of file it is.  In your case, you just want to get those bytes read and sent out so they can be written down at the destination.
    Write to Binary File - At the destination side, this is what will store those bytes to the file you created with number 1.
    Get File Size (under the Advanced File Functions sub-palette) - You need to know how big the file is so you know when you are finished.
    OK, so once you are able to create files, write bytes to them, and read bytes from existing files you can move on to transferring.
    The basic method I would suggest is to have the user specify a source file on the source PC and a destination folder on the destination PC.  Then, find out the size of the source file using number 5.  Divide that size number by the number of bytes you feel like transferring at once.  The serial buffers are usually around 32k (if I remember correctly) so do not exceed that.  Now begin sending data by reading some number of bytes and wiring that string output to the VISA Write function.  On the destination side, you'll want to be monitoring the serial port for bytes and reading them when they arrive.  Wire that string to the Write to Binary File function to add them to your destination file.
    That is the basic outline of how to do it.  You have to be careful not to overload the write and read buffers on the serial ports.  Initially you can use delays on the sending side to make sure the reading side has enough time to digest.  To get things moving faster, you can bring in some flow control.
    If all that sounds a bit intimidating, there are Alliance Member companies out there (such as PrimeTest Automation) who can write such code for you and even provide a turnkey solution for you.
    Happy wiring,
    Dan Press
    Certified LabVIEW Architect
    PrimeTest Automation

  • File transfer of larger size through serial port

    Hi
    I need to transfer files of larger size may be around 20Kb through serial port. Can some one suggest some idea or can provide any sample VI for achieving this. i guess we cannot send the complete file at a stretch, so we may need to form some packets and then send. If i am right i need some help for achieving this.
    Padhu

    You may want to use something like the XMODEM protocol. 
    I believe you can find a version of XMODEM that can be used with an NI-VISA session located here on the OpenG forums.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Send DAQ measurement results through serial ports

    Hi, All
    I use PCI-6034E for measurement. After DAQ gets data, I send them to another computer through serial port (com1). I write a Virtual C++ program, which calls NI-DAQ library functions to implement DAQ data sampling (multiple channel scan) and sends measurement data to another computer through serial port under request. DAQ data sampling and serial communication are implemented in two threads. They are running concurrently. They share a global memory for measurement data. The serial communication thread will do infinite wait and send data only when another computer sends a request through serial port.
    I met two problems. First, when I reduce the size of DAQ measurement buffers (piBuffer and halfpiBuffer, I us
    edouble buffer model), DAQ measurement is often interrupted by the message "[DAQ_DB_HalfReady] returned NI-DAQ warning 10846. Your application was unable to retrive data from the background acquisition buffer fast enough so the unretrieved data was overwritten with new data. ...". I want to get run time data so I need to reduce the buffers as small as possible. How can I solve it ? The second problem is that the serial port gets error data (nothing) from measurement computer sometimes, especially when DAQ initializes itself and finishes work. It looks like that there is a conflict between DAQ and serial port. Does anyone have similar experience about this? Any suggestion?
    Thank you in advance.
    Le Cai

    Le Cai,
    You are correct that the number of scans to read is equal to half of the buffer in double buffer mode. I was mistaken and referring to a standard (non double buffered) operation. However, you can increase the size of your buffer without affecting the period of your acquisition. A buffer of 60 is quite small and, as such, will be more prone to overflow errors. The rate is actually set through the DAQ_Rate() and DAQ_Start() functions. For more information on these functions and how to configure the scan rate, please see the NI-DAQ Function Reference Manual.
    NI-DAQ Function Reference Manual for PC Compatibles
    http://digital.ni.com/manuals.nsf/websearch/1630A0B68738B269862567C1007A2912?OpenDocument&node=132100_US
    A good place to start would be the example titled, "DAQdoubleBuf.c" which ships with the NI-DAQ driver. If you installed the examples for Visual C++ when you installed the NI-DAQ driver you should be able to find this example in the \Program Files\National Instruments\NI-DAQ\Examples\VisualC\AI folder on your computer. This example would be a good template as it is very close to what you are trying to do.
    If you observe that you only receive the overflow error when you are operating the two threads, thus ruling out the buffer size as being a potential problem, you may want to examine whether or not your second thread is placing a lengthy exclusion on your data buffer during the period when your first thread is trying to move the data. If your first thread has to wait during the half-buffer transfer this could easily cause the overflow, as the acquisition would be running but the transfer would be paused. Instead of placing a mutual exclusion around one piece of global memory you could try using a queue instead. A queue approach will allow you to pass the data from the first thread into a queue to be read, when convenient, by the second thread. In this method the first thread would never have to wait as the transfer would just be a handoff.
    Regards,
    Justin Britten
    Applications Engineer
    National Instruments

  • Can i control mt iPhone through i cloud using my laptop

    can i control mt iPhone through i cloud using my laptop

    scrapman26 wrote:
    i was told it can take between 5 and 72 hours for the carrier unlock is done.
    And have you waited that long? If not, then that's why it's not done yet.

  • Any way to communicate with Serial PORT using JavaScript

    is there any way to communicate with Serial PORT using JavaScript ??
    Dont tell me to do it in java because I need to this on client side not on server side.
    such as when client pressed the button, a javascript function will be called and in that function I need to communicate with the serial port of that client... That action will not go to server side.

    Is there any way to send a string of bytes to the serial port from the client side ?
    Just a button on the web page that sends out stuff to the comport.
    I was hoping to do this using java script also ..

  • Problem connecting N79 to serial port using blueso...

    Greeetings to All,
    I have a big problem, when i connect my n79 using bluesoleil v3.0, i got File transfer, dialup networking and object push services only.
    If i try to start serial port service to connect my n79 to a serial port it displayes error "can not start service".
    i have tried various bluesoleil versions but the problem remains same everytime. on the other hand i can connect my sony k750i to a serial port without any problem.
    can someone tell me how to connect n79 to a serial port using bluesoleil
    OR
    Does N79 not support bluetooth serial port connectivity?
    or is there any other way to connect n79 to a serial port using blesoleil and my bluetooth dongle on a WINXP SP2 system?
    Thanks in Advance

    Yes, PCSuite supports a great deal of Bluetooth drivers. These are all built in so, give it a try.
    Windows Vista x32 en x64 editions:
    Microsoft Windows Bluetooth stack
    Toshiba Bluetooth stack, driver versie 5.10.12
    IVT BlueSoleil Bluetooth stack, driver versie 5.0.5
    Windows XP x64:
    Microsoft Windows Bluetooth stack
    Toshiba Bluetooth stack, driver versie 5.10.12
    IVT BlueSoleil Bluetooth stack, driver versie 5.0.5
    Windows XP:
    Microsoft Windows Bluetooth (enkel in Service Pack 2)
    Toshiba Bluetooth stack, driver versie 4.0, 5.0 and 5.10.12
    WIDCOMM Bluetooth stack, driver versie 1.4.2, 3.x, 4.x and 5.x
    IVT BlueSoleil Bluetooth stack, driver versie 2.x, 3.x and 5.0.5
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • I'm new to the LabView. How do I pass data from VI configured using Serial (CMTS using CLI commands to set Parameters ) to VI configured using GPIB(vecto​r signal analyzer ) to measure such as RF frequency or power on the instrument​? Thanks

    I'm new to the LabView. How do I pass data from VI configured using Serial (CMTS using CLI commands to set Parameters ) to VI configured using GPIB(vector signal analyzer ) to measure such as RF frequency or power on the instrument?
    I just want to set something on the front panel that will execute the Serial parameters first and then pass these settings to vector signal analyzer
    Thanks
    Phong

    You transfer data with wires.
    Frankly, I'm a little confused by your question. I can't think of any reason why you would want to pass serial parameters (i.e. baud rate, parity) to a GPIB instrument. Please explain with further detail and attach the code.

  • Want to use dotNet with teststand, but unsure how to send commands through serial port

    I have a loCom communication dll used to send and recieve commands through serial comunication for a particular product.  I the past they have used a LabVIEW wrapper to send and recieve commands, using this particular dll.  I would like to just use testStand for the DOTNET Dll.  I can get the commands, know the inputs and outputs required, however I can not figure out how to send the commands to the serial port.  Anyone have any exprience doing this in TesSTand?

    hallawt,
    With your .NET code module, you should be able to call it directly, most likely as a parameter in the .NET method.
    What are the inputs for the method you're trying to use?
    Also, could you clarify where you're starting to have problems in your project?
    Regards,
    Renée M
    Applications Engineer
    National Instruments

  • Help with reading information coming from a software into LabVIEW through Serial port

    Hi,
    I am new to LabVIEW and also an amateur in using RS232 for communication. I have this software that has these icons like speed increase/decrease, elevation up/down, start/stop. Now, when I click these buttons on the software, they perform the appropriate functions. For example, if I press start button, the signal must go through a serial COM port into LabVIEW to start the machine. How do I do that? How do I find what format the code word is when I press a button on the software? And how to decode the information to read whether the button pushed is start etc...? Any help would be appreciated.

    I may not be perfect, but I'm all I got!

    That information would be in the programming manual for the device you're controlling. Unless you have a device that has no documentation or you cannot get the documentation that's the first place you should look. If you cannot get the documentation at all then you've got some reverse-engineering to do. To do this you will either need a serial port sniffer (a hardware device), or you can try to use a software-based port capturing program. On Windows PortMon is the most prevalent. This will show you how the port was configured (baud rate, stop bits, etc). Warning: the information is technical.
    As far as how to get it running in LabVIEW, you should take a look at the serial port communication examples that ship with LabVIEW. The most problems occur in figuring out how to (a) terminate a write command, and (b) determining when to stop reading. For (a) this is typically done by appending a carriage return or linefeed to the command. This is device dependent. For (b) this is usually done by the byte stream ending with a character like a linefeed. Again, this is device-dependent. 
    You may also want to peruse this KB article: Serial Instrument Control Tutorial. There are also lots of tutorial on the internet for basic tutorials on serial port communication.

  • Problems with access to serial port using reentrant code

    Hi,
    I have a VI that send commands and receive answers from an instrument using
    de serial port.
    This VI runs perfectly when used alone.
    However I'm trying run two instances of that VI simultaneously using
    reentrant code and I'm facing some problems.
    Sometimes everything is OK but sometimes, in the process of writing to
    serial port the following error happen:
    Error code 36.
    Invalid refnum device.
    What is this?
    Does someone know how to prevent this?
    Thanks in advance for any help.

    "Paro, Paula [CMPS:2721:EXCH]" wrote:
    >
    > Hi,
    >
    > I have a VI that send commands and receive answers from an instrument using
    > de serial port.
    > This VI runs perfectly when used alone.
    > However I'm trying run two instances of that VI simultaneously using
    > reentrant code and I'm facing some problems.
    > Sometimes everything is OK but sometimes, in the process of writing to
    > serial port the following error happen:
    > Error code 36.
    > Invalid refnum device.
    >
    > What is this?
    > Does someone know how to prevent this?
    >
    > Thanks in advance for any help.
    You can't use reentrant vi's vith serial vi calls without supervising of
    driver.
    Use VISA instead and you have to control the VISA session opening and
    closing. Another word is that the only one serial port sess
    ion should be
    opened at a time.
    Reentrant vi's for serial port without checking serial port session is a
    mistake of program algorithm. Change it in any convenient way.
    Sergey Krasnishov
    Automated Control Systems
    National Instruments Alliance Member
    Moscow, Russia
    [email protected]
    http://acs.levsha.ru

  • Reading/writing to serial port w/ VISA in Labview

    I'm writing a Labview program to control and to read data from a Varian vacuum pump controller. It is connected to the serial port in my computer, and I have been trying to open a VISA session to communicate with the instrument. So far, however, the computer cannot see the instrument--I get the same error messages reading and writing to the instrument as I do to an empty serial port. Does anyone have any suggestions on what the problem might be? Thank you.

    There are a lot of possiblities. Is the cable correct? You probably need a crossover cable (TX and RX) swapped. You also need to check and make sure the serial ports on both ends are set the same (i.e. baud rate, handshaking, stop bits, etc.). Make sure that the port is enabled. I've seen people try to use a comm port only to find that a modem card installation caused the port to be disabled. You could also try using hyperterminal to talk to the instrument. If you can communicate there, you can eliminate any hardware problem.

  • 0 bytes at serial port after Visa Write

    Hi,
    I'm having problems communicating with a Pollux box controlling a stepper motor (both from Micos). The Pollux box has an RS232/485 connection to the computer. 
    I have tried adaptations of LV's Basic Serial Read and Write example. Even for the basic example there has never been any bytes at the serial port after the write.
    I have attached some sample code for LV 10.0.1(64bit) and the OS is Windows Server Enterprise 2008.
    The Visa drivers have just been installed.
    After some research I have added a 'Set I/O buffer size' as advised by http://digital.ni.com/public.nsf/allkb/60DDFED7EFEFE7188625705700750821?OpenDocument
    The time-out is set to 10s, I have a wait of 1s before read and 0.5s between each write (the characters are written individually incase that was the problem).
    The write command getaxisno_ should reply with the default axis no which is 1. However, there is never any reply.
    The termination character for Venus2 is a space for transmitting commands and ASCII CR LF at the end of received data.
    I'm not sure what else could be wrong. According to MAX the device is working properly. Although, when I try to open a Visa test panel in MAX the program crashes. I'm not sure if this is a related problem.
    I'd be really grateful for any advice, have been trying to fix this for a few days now.
    Thanks in advance!
    Ciara
    Attachments:
    Getaxisno test.vi ‏18 KB

    Thanks, I'll search those now.
    When I click the test panel button, the Max window disappears and the program is closed. Next time I open it an Unexpected Error box opens with a message saying there was an unexpected error and I should search Info Code MAXKnownException.
    'The exception occurred in the NIMax process in the function (Unknown).'
    I have searched this and the info advised me to send a report with log files etc to NI which I have done. Just waiting on the reply.
    I copied the Visa resource name from MAX and the termination character is the same as what a previous owner of the equipment used in Visual Basic. 

  • Com,unicting on Serial Port using RXTX on Mac System!

    Hi,
    I have written an application which acts as an interface between the GPS device and Mac System. I have used rxtx api for communicating on Serial Port. The communication works well for some time. This device gives NMEA output and its proprietory sentences as output too. It is a GPS data Logger. I have to pass different commands for communicating. For instance for login purpose I have to pass the command $PLSC,231,1*FF. And on passing this command the device stops giving NMEA sentences. And responds back with $PLSR,231,1,1,00000000,GPSLOG*33. Sometimes this output and NMEA output both gets mixed up such as $PLS,$GPRMC,00000GPS,,,,.
    The devices windows application which is not developed in Java works fine. Is it the problem with Serial API or some other issue. The device operates at 4800 baud rate.
    Can anyone over here help me out?
    Thanks & Regards
    Sunil

    This is just a shot in the dark.
    Try right-clicking on the VISA write and select "do I/O syncronously".
    If this works, please let me know. I have been trying to figure a good reason to do serial I/O "syncronously" but was not able to come up with one until I read your question.
    Curious,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • In exit EXIT_SAPLKD01_001 populate custom segment of idoc ext. cremas05

    Hi,    I am using EXIT_SAPLKD01_001 where I need to populate 2 custom segments for idoc extension cremas05. I have created a function module separately where I have populated the 2 structures that is of same type as the segment structure. In the exit

  • Tabbed Panel Question

    I have created a tabbed panel on one of my pages.  It appears to be working correctly in design mode, but when I preview in my browser, the only panel that works is the top (first) one.  Here is a link to the page: www.robertmunozphotography.net/Muse

  • Inter company settings

    experts:- Inter Company Transaction settings, can u give the customization for the path wise, (very urgent).

  • How to customize the message using HttpSession info in WL-PubServer

    Hi, im using Weblogic 10.3 Publish-Subscribe Server (PubServer) in order to create Comet application. http://e-docs.bea.com/wls/docs103/webapp/pubsub.html We are utilizing JMS Message system to support Clustered environment, and everything works grea

  • Rotate for android

    Is there a way to rotate a pdf on you android devices? I know how on a computer and laptop. If not when will we be able too? Sorry if there has been an answer somewhere, but i did a search annd all i found was ways to do it on your computer.