RS-232 via Camera Link

I've put together some code for VC ++ to open a connection RS-232 over link camera and send/receive orders. The code compiles and runs, but I get no response from the camera. The command I sent you is directly from the seller, so for now I guess it's okay. Is the following correct code? I would be very grateful if someone could look over the code below and let me know if I have a missed anything. Thank you.

I checked the interface file contains the reference to the camera that I use and that the camera file is configured to support serial communications at 56 kbaud.

void sendCommand (void) {}
int error;
NSerial Int32, size;
char response [9];
name char [64];
char buffer [] = {49 0 x, 0 x 73, 0 x 65, 0x03, 0x3F, 0 x 04, 0 00 0 x 28, 0x0D};  Example command camera of provider
text Char [32];

unsigned int bitsPerPixel;
DWORD dwThreadId;
    
Create the event which should be reported when we
you want to stop the acquisition.
HStopEvent = CreateEvent (NULL, TRUE, FALSE, NULL);
If (!.) (Return HStopEvent);

Create the thread that is responsible for closing
to the bottom of the acquisition
HStopThread = CreateThread(, 0, (LPTHREAD_START_ROUTINE) StopThread, (LPDWORD) & HStopEvent, 0, & dwThreadId);
If (!.) (Return HStopThread);

Get the interface name
GetWindowText (HIntfName, name, 64);    HIntfName is the HWND, or interface = img0 handle, which is correct

Get the interface name
errChk (imgInterfaceOpen (name, & Iid));
errChk (imgSessionOpen (Iid, & Sid));
    
errChk (imgGetAttribute (Sid, IMG_ATTR_GETSERIAL, & nSerial));
sprintf (text, "dddd %", nSerial);  Get the index of the serial connection and display in a text box
SetWindowText (HSerialOut, text);  HSerialOut is the handle to a text box

Size = sizeof (buffer) /sizeof (Char);  # character in the command buffer (9)
imgSessionSerialWrite (Sid, buffer, & size, 2000);  2 sec writing timeout (should be more than enough)
imgSessionSerialRead (Sid, response, & size, 2000);  Same thing for read

sprintf ("%s", text, response);
SetWindowText (HSerialOut, response);  Don't get any impression and no error message

Error:
If (error<0)>
DisplayIMAQError (error);
PostMessage (ImaqSmplHwnd, WM_COMMAND, PB_STOP, 0);
}

return;
}

Tim:

The code works; the problem is that the series writing and reading calls return 0, which I interpreted as the number of bytes sent and received, respectively. It looks like 0 simply means that the call worked, I decided that it was the case looking at the answer. Thanks for your help.

Charles

Tags: NI Software

Similar Questions

  • Question setting baud rate to IMAQ using Camera Link

    I have a card PCIe-1433 to link camera, with a camera of Basler. I found that I can put the gain and exposure both directly in the camera with the help of the link series and order series. It works very well. I do this programmatically by using the CLAllSerial.DLL.

    Series orders take too long to send in my application because of the default 9600 baud rate, so I was able to send a command to the Basler camera up to its transmission speed, then changing the baud rate of the port com series camera link for the match. The result is that I can quickly talk to the camera. Sweet so far.

    However, with the Basler camera and camera link com serial port to the higher transmission speed, I can no longer acquire images using imgXXX IMAQ commands. I get a time-out of orders series IMAQ must use to control the camera for Imaging. Essentially the IMAQ driver does not know the baud rate change. I don't see how I can tell the IMAQ driver what output baud rate to use. Also, NEITHER MAX becomes unusable in this situation.

    How can I, via the IMAQ driver, increase the speed of transmission of orders series to the camera via the connection of the camera?

    See you soon,.

    Wayne

    So, I thought this close and post the solution. To increase the speed of transmission of communications series through camera link, you must:

    -Use the NI Camera File Generator to change the file of the camera (or simply edit it directly, since it is the text file).

    -Run NI MAX and connect to the camera using the new camera file. MAX will not be able to talk to the camera at the moment, because the speed of camera has not yet been changed.

    -In your application, first set the link rate 9600 series, so you can talk to the camera. Now change the baud rate in the camera itself, using all save changes, etc., are necessary for the camera, you are connected to. Finally, change the speed of link series to baud rate selected in the file of the camera. (It goes without saying that the serial link baud rate and baud rate camera must match).

    Now, both the driver AND AND the camera are according to the new baud rate. You can exit the application and allows to access your camera... until you turn off the camera... how he NI MAX (at least the Basler I use) restores baud rate 9600. Works great!

    See you soon,.

    Wayne

  • Connecting series of camera link vi - simple program does not

    I have a program very simple, attached here.

    The command, 'PAG' that is sent via IMAW series write must return a bunch of text describing the parameters of the camera. Every time that it runs, the series read times out.

    I looked through several examples showing how to use the functions IMAQ series write and read series, including several discussions here, but I have yet to find anything to indicate where I have gone wrong.

    Please take a look and tell me what you think. Thanks in advance.

    Installation program:

    Windows 7

    LabVIEW 2011

    Acquisition card NI PCIe-1427

    DALSA 1 M 30 camera, Camera Link

    Hello

    Did you check the syntax of the command, you must send with your digital camera?

    Each supplier of the camera has its own syntax.

    Sometimes, you just add a newline at the end of your chain command.

    Hope this helps

    Kind regards

  • Acquisition of images using PCI-1426 and Camera Link Camera

    Hello

    I am writing a program to capture images of a Camera Link camera via the PCI 1426 acquisition card in LabVIEW. The problem that I am facing is that I am unable to find the correct controls in the functions palette to start the image capture. Could someone tell me please how much control I'm supposed to use?

    I've worked on similar request sometimes back, I used IEEE 1394 camera, so once I found the correct block diagram controls I should be able to go from there.

    Thanks in advance,

    Sandeep

    Hello Kristen,

    Thanks for the suggestion. I was able to solve this problem. I think that was what was causing the problem I have LabVIEW 8.6 installed on my system and he had the Vision Acquisition System (VAS) 8.5.1. But, once I installed VAS 8.6 I saw the IMAQ in the functions palette.

    I'm guessing that LabVIEW 8.6 does not recognize the toolboxes of previous versions.

    Sandeep

  • Camera Link image, line, data valid bit locations

    Hi all

    (see also http://forums.ni.com/t5/Machine-Vision/How-can-I-know-if-the-PCIe-1433-sees-a-Frame-Valid/td-p/31769...)

    I'm trying to re-design code FPGA vendor to change a camera of 4 x 12 Medium to Full 8 x 8.

    The Camera Link standard is quite confusing. The way I read it, a Camera Link of 8 x 8 Full camera should affect the valid as follows:

    LVAL: bit 24 on three channels

    FVAL: bit 25 of the three channels

    DVAL: bit 26 on three channels

    For some reason, the provider asigned them like this (and IT WORKS!):

    LVAL: bit 18 on three channels

    FVAL: bit 19 in all three channels

    DVAL: bit 20 of three channels

    There is another format that corresponds to the valid Bit arrangement? If so, is there something in the Camera File Generator and. Files of CIM which defines the format?

    See you soon!

    Crazy

    Crazy,

    Yes, you are right the LVAL, FVAL and DVAL are on TX/RX24, 25 and 26 respectively.  These assignments of bits match with parallel interfaces on Channel Link Serializer/Deserializer chips.  The PCIe-1433 expect that framing signals are mapped to the signals to the camera.

    Not all cameras output a signal DVAL, so they can be ignored in the acquisition card (PCIe-1433) with a camera file parameter.  In addition, the polarity of the signals framing can be reversed with a camera file affecting as well.

    You may be interested in using Camera Link Logger with the PCIe-1433 to receive signals from the camera.   Camera link Analyzer will present the traffic camera link in a format easy to read Visual format that can help your development and debugging.

    http://www.NI.com/product-documentation/14301/en/

    Regards, Jeff

  • Camera Link or USB3

    I have a vision system using a color camera and frame grabber (1410).  As the future of cards near his end, prepare for obsolecense I think camera Camera Link or USB3-migrate.  I used the Camera Advisor and did not see an option USB3.  USB3 has the bandwidth and is less expensive than the Camera Link but I don't want to have to deal with the writing of my own vision of calls to acquire images of the USB3 camera or change the settings.  I want to be able to use MAX to do preliminary tests / troubleshooting the device.  I had problems with not being USB2 devices is not 100% compatible with the drivers OR so I worry about the USB3.  My question is should I just go with Camera Link or I'll be able to easily use the USB3 with LabVIEW?

    You don't need to use the Camera Advisor to see if compatibility exists with USB 3.0. You just need to make sure that your camera is USB3 consistent Vision. Also note that comparing Camera Link with USB3 may not be the best. I see the USB3 compete more with the GigE interface. Camera Link interface can give you with bandwidths up to 850 MB/s and USB3 can give up to 400 Mbps with GigE around 125 MB/s. The USB3 plug-and-play functionality is very similar to GigE.

    NOR-IMAQdx, part of the Vision Acquisition Software driver package, supports USB 3.0 compatible USB3 Vision devices so you should be OK, using software products from National Instruments (including MAX) to interface with your device. Remember that USB 2.0 devices was a different story. With which National Instrumetns took only supported these devices with a DirectShow interface.

    In addition, suppliers of vision and camera announced USB3 only last fall. So there still some time before USB 3 becomes most used in the industry. Basler has just published the cameras Ace USB 3.0 , but they will be available in Q2.

    If you don't need the benefits of Camera Link and USB3 fills your specifications, my recommendation is to go with USB3.

  • camera link standard

    I need to understand the Camera Link standard. Say I have an image in format: metadata + image bytes data. In the case of a Camera Link base interface which has just 3 lines of 8 bits of data wide FVAL, LVAL and DVAL, make just put the image data 3 bytes at a time on data lines while increasing the FVAL, DVAL, LVAL siganls until the end of my bland of data? Any help would be really appreciated.

    Thank you in advance,

    -Karima

    You can also have a look at a few tming of the diagrams that are included in some camera manuals. You could have a look on this one of Photonfocus for example: http://www.photonfocus.com/upload/manuals/MAN037_MV_D1024E_3D01_V1_1.pdf

    Hope this helps,

  • How can you save session hearing on a different hard disk, sent via dynamic links to first?

    I am a Mac user. I train to a PC user to edit my audio.

    After the edict of sequences in CEP I send it via dynamic links to hearing make the audio changes then new return to CEP.

    How can I save the project/session of my Mac on a drive external hard shared for the PC user edit in Audition?

    I tried to send the CEP project via dynamic link to hearing, then opening audio files in Audition, then with the video showing in hearing - file > export > Session > checked "save copies of associated files" & chose the external hard drive that we share. No dice. External transfer to the computer and open the hearing session he has no related video and audio files that I had opened are not there. Essentially, this is an empty session.

    Help!

    Hi... basically dynamic link is not what you want if you want to send it to someone else for sound editing, as I can tell. I think the best option for you would be to select 'Export DV Preview Video' rather than 'Send by Dynamic Link' (under 'Edit in Audition'), which I think should export a video resolution low - ish, and the audio files and XML for hearing.

    Hope it is helpful

  • First will not open my project after that I have record in SpeedGrade via Direct link

    First will not open my project after that I have record in SpeedGrade via Direct link

    Last night, I installed all the updates of CC, everything went well.

    All day I was doing the color correction in SpeedGrade to PremierePro project via direct link.

    After I finished, I wanted to go back to first to make an export (my manager was waiting for a sample) only, when the first attempted to connect to the project I worked on SpeedGrade, could not open!

    She the Saturn: "this project has been saved in a newer version of Adobe Premiere Pro and cannot be opened in this version.

    Before panic to my Director of waiting, I've saved every look I did in SpeedGrade as an individual LUT I could manually apply in an earlier version of the PremierePro project. But it took a long time and it's may not be a long-term option.

    What can be the problem between saving in SpeedGrade and then back in PremierePro?

    I PremierePro CC 2015 v. 9.02 (6) and CC SpeedGrade 2015 v. 2015.1

    I'm working on MacBook Pro Retina display 15'.

    Simple... you SpeedGrade 2015.1 (9.2) and PrPro 2015.0.1 (9.0.1). They don't 'work' together.

    You must get your PrPro up to 9.1, 2015.1 release. If your desktop application Adobe CC is not show your 'eligible' for the upgrade PrPro, sign out of it, then back in... that often useful. If this isn't the case, you may need to use the soft Cleaner CC Adobe to remove the application from Office CC & then reinstall it and reconnect.

    https://helpx.Adobe.com/Creative-Suite/KB/CS5-cleaner-tool-installation-problems.html

    Neil

  • I recently bought the Canon5Ds and the files can be played via camera raw with my version of CS5.  What should I do?  Is there a download that will correct this problem?

    I recently bought the Canon5Ds and the files can be played via camera raw with my version of CS5.  What should I do?  Is there a download that will correct this problem?

    For CS5, you must use the free DNG Converter. as this camera camera raw 9.0 required.

    Adobe - Adobe Camera Raw and DNG Converter: for Windows

    Adobe - Adobe Camera Raw and DNG Converter: for Macintosh

  • try to download the software: via the link provided in the email, I get an error page «» Then I tried via my account by clicking on the link 'Download' screen 'my order. " Then, I get a message saying "you have no download. I'm almost ready to fi

    Hi, I just bought first elements. I paid online via Paypal. I got the Adobe confirmation email a few hours later. I then try to download the software: via the link provided in the email, I get an error page «» Then I tried via my account by clicking on the link 'Download' screen 'my order. " Then, I get a message saying "you have no download. I'm almost ready to file a complaint with Paypal for fraudulent online sales. What should I do?

    Hi H D,

    Tell us the name of the product you have purchased.

    Please visit: http://www.adobe.com/downloads/other-downloads.html

    Let me know if it helps.

    Concerning

    Megha Rawat

  • How can I call a function table in pipeline via DB link?

    I am using a function table in pipeline defined in a remote DB (DB_A) of my DB in local (DB_B) via a link DB (DB_A_REMOTE).

    The function table in pipeline is defined in a package with all the specifications of type he needs and works very well when she is called locally but when called it remotely fails

    Here is an example configuration in DB_A:
    connect scott/tiger
    create or replace
    package pkg as
      type rec is record (
        dte date
      );
      type rec_set is table of rec;
      
      function dts(p_eff_date date) return rec_set pipelined;
      function dt(p_eff_date date) return date;
    end;
    /
    create or replace
    PACKAGE BODY pkg AS
    
      function dts(p_eff_date date) return rec_set pipelined AS
        r rec;
      BEGIN
        r.dte := p_eff_date;
        pipe row(r);
        r.dte := r.dte+1;
        pipe row(r);
        RETURN;
      END dts;
    
      function dt(p_eff_date date) return date as
      begin
        return p_eff_date;
      end;
    
    END pkg;
    /
    In DB_B, I have the following configuration:
    create database link DB_A_REMOTE connect to Scott identified by tiger using 'DB_A';
    create or replace synonym RPKG for PKG@DB_A_REMOTE;
    In DB_A, I can access the two PKG functions very well
    SQL> select pkg.dt(sysdate) from dual
    DJ.DT(SYSDATE)       
    ----------------------
    21-SEP-2012 11:26:31   
    
    SQL> select * from table(pkg.dts(sysdate))
    DTE                  
    ----------------------
    21-SEP-2012 11:26:31   
    22-SEP-2012 11:26:31   
    23-SEP-2012 11:26:31   
    24-SEP-2012 11:26:31   
    However, in DB_B the I get the following:
    SQL> select rpkg.dt(sysdate) from dual
    RPKG.DT(SYSDATE)     
    ----------------------
    21-SEP-2012 11:29:05   
    
    SQL> select * from table(rpkg.dts(sysdate))
    
    Error starting at line 2 in command:
    select * from table(rpkg.dts(sysdate))
    Error at Command Line:2 Column:20
    Error report:
    SQL Error: ORA-06553: PLS-752: Table function DTS is in an inconsistent state.
    06553. 00000 -  "PLS-%s: %s"
    *Cause:    
    *Action:
    selection rpkg.dt shows I can get to the remote package and run functions in it, but the second line is where my problem.

    Why the function table in an inconsistent state and how can I fix this problem so that it will work in all of the linlk database?

    Published by: Sentinel on September 21, 2012 11:35

    Go! You have posted more than 1,000 times and know that you must provide your Oracle version 4-digit.
    >
    Why the function table in an inconsistent state and how can I fix this problem so that it will work in all of the linlk database?
    >
    You can't - it is not supported.

    See the note under the PIPELINED clause in the declaration section of the definition of the doc of PL/SQL and function
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25519/function.htm
    >
    Note:

    You cannot run a function table in pipeline over a database link. The reason is that the return type of a function table in pipeline is a SQL type defined by the user, which can be used in a single database (as explained in the Guide of the Oracle object-relational database developer). Although the return type of a function table in pipeline may appear as a PL/SQL type, the database actually converts this PL/SQL type to a type defined by the corresponding SQL user.
    >
    Your code using PL/SQL types for these types are implicitly converted to the SQL type needed to access the service using SQL. But the SQL types have an OID (object ID) which is not recognized on the other server so that the other server is unable to create the appropriate type.

    If you click on the link provided to the other doc in this note, you will see that even though you can create a type and specify an OID you still won't be able to use it as you wish.
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e11822/adobjbas.htm#ADOBJ7083
    >
    Restriction on the use of Types defined by the user with a remote database

    Objects or user-defined types (specifically, types declared with a SQL CREATE TYPE statement, as opposed to types declared in a PL/SQL package) are currently only useful in a single database. Oracle database limits the use of a link of database as follows:

    Unable to connect to a remote database for select, insert, or update a type defined by the user or a REF object on a remote table.

    You can use the CREATE TYPE statement with the Optional keyword OID to create an object identifier specified by the user (OID) that allows an object type for use in multiple databases. See the discussion on the attribution of an OID for a type of object in Oracle Database Data Cartridge Developer's Guide.

    You cannot use the links from the database of the PL/SQL code to declare a local variable of a type defined by the remote user.

    You cannot pass an argument value or return of type user defined in a PL/SQL remote procedure call.

  • change timeline from first pro via dynamic link cs5 yet?

    I'm sure this has been covered before, but I can't find

    anything on the dynamic links in this forum.

    I created my video in still and export still sequence via dynamic links.

    Then, I created all of my menus etc in even, after which, I noticed a few glitches that I wanted to change, so I went back to the first and edited for changes.

    How to still bring back on these changes? It didn't happen automatically as I hoped, and I don't want to have to recreate my new menu structure in yet.

    So, basically, how can I make a change in the first and reflected it in my project again without creating a new project?

    Thank you

    Andy

    If you have converted the sequence Pr or generated the project already, then you need to file. Revert to the Original for en to update changes in sequences of Pr.

    -Jeff

  • Export to Excel, via a link on the page of action

    I have two questions.

    (1) how can I export to excel, via a link.  For example I have a form, a user clicks submit, and I've got cfoutput data in a table on the same page (action page is identical to the entry page).  Now, once the output data, I'd like a link on this page so that the user can click and it will export the table to Excel.

    I tried:

        <cfheader name="Content-Disposition" value="attachment; filename=test.xls">
        <cfcontent type="application/msexcel">
        <cfoutput query="qTest">
        <table>
        <tr>
        <th>Account</th>
        <th>Amount</th>
        </tr>
        <tr>
        <td>#qTest.ACCOUNT#</td>
        <td>#NumberFormat('#qTest.TotalAmt#', "_(999,999,999.99)")#</td>
        </tr>
        </table>
        </cfoutput>

    But once the page is loaded, he tries to export automatically.  How can I get to export via a link?

    Also, someone suggested wrapping the cfoutput in a < cfsavecontent variable = "xyz" > tag, but once I have it, how do I insert the variable 'xyz' in the tag < cfcontent >?  Or where can I use it?

    Thank you guys

    The variable that contains the output table.  Just put another #session.export # in the appropriate place in your logic will be displayed on the screen using the scenario.

  • Impdp fails via data link

    Hello

    I am trying to import a particular schema of another instance in my instance via a link of database using Data Pump.

    Source instance: Solaris on Sparc 10.2.0.4.0 64-bit
    Instance of the target: Linux on x 32, 10.2.0.4.0

    I created a database on the target database link and checked the link to work, i.e. I could query the tables in the remote database by using the user who should receive the data.

    I created a directory "exp" on the target database and have the appropriate permissions for 'mh03.

    Then I tried importing and got an error:

    -----

    Oracle@padsw7ora01 imp$ impdp mh03 / * NETWORK_LINK = padsol25 = test_bas_bkrus_d123120 REMAP_SCHEMA = test_bas_bkrus_d123120:mh03 = exp = imp.log LOGFILE DIRECTORY SCHEMAS

    Import: Release 10.2.0.4.0 - Production on Tuesday, January 20, 2009 14:47:30

    Copyright (c) 2003, 2007, Oracle. All rights reserved.

    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39006: internal error
    ORA-39113: unable to determine the database version
    ORA-02083: name of a illegal character data '-'

    ORA-39097: Data Pump job encountered the error unexpected-2083

    Oracle@padsw7ora01 imp$

    -----

    I tried searching metalink and web but not able to find any useful information. I tried using the VERSION = '10.2.0.4.0' parameter, but this did not help either (error message remains as what).

    I found what seemed somewhat related:

    ORA-39113: unable to determine the database version
    Cause: The Data Pump has been impossible to determine the level of compatibility with the version of the current database using SYS. DBMS_UTILITY. DB_VERSION.
    Action: Be sure you have access to the DBMS_UTILITY package for you. If it is a network work, make sure that package DBMS_UTILITY access is granted to you on the remote instance.

    But even that "grant execute on SYS. DBMS_UTILITY to mh03' did not help at all.

    I realize that the target database is compatible to 10.2.0.3.0:

    -----

    1 declare
    2 v varchar2 (1000 char);
    VARCHAR2 (1000 char) 3 c.
    4 start
    DBMS_UTILITY 5. DB_VERSION (v, c);
    6 dbms_output.put_line (v);
    7 dbms_output.put_line (c);
    8 * end;
    SQL > /.

    PL/SQL procedure successfully completed.

    SQL > set serverout on
    SQL > /.
    10.2.0.4.0
    10.2.0.3.0

    PL/SQL procedure successfully completed.

    SQL >

    -----

    Any ideas, what went wrong and how can I remedy this? Thank you very much!

    Kind regards

    Robert

    Published by: rklemme on January 20, 2009 06:16

    rklemme

    In my case it had nothing to do with the host name of the server, or name resolution. It was related to the global_name of the instance.
    I could question using the link but not to perform a remote import.

    Try to temporarily change your global_name by removing the hyphen in domain name and test your import:
    SQL > alter database rename global_name to .pad. * mycompany * .net.

    PY

Maybe you are looking for

  • How can I access Favorites in aurora Metro?

    Hello!I installed aurora and it starts in underground mode, then where are all the menus and stoff went?In particular, how do you get all my bookmarms?Many greetings!Volker

  • Node property/reference for the image and 'Create VI' inconsistent control?

    Hello I encountered this problem several times already and although I have worked around him, so far, I would really like to understand what is it: If I have an image display control on the Panel before (IMAQ Vision, not the image control type) and d

  • SSD partitioning and Wear levelling

    Hello I just installed a Pro 480 G drive on an old laptop and partitioned the disk 78/368 for OS & data respectively. The disk partitioning will reduce the CUTTING capacity to implement wear levelling on each partition or wear leveling is done throug

  • Battery performance is not as good as expected.

    My Z3 is now just 3 months. It is supposed to have good battery life... but it's very good for my phone... I write my battery use. How long it is for other people while using wifi and music. ??I put very low brightness and it is adaptive for the ligh

  • local host to access the vpn site to site with nat static configured

    I have two 881 routers with vpn site to site between them. I have a static nat on the router for a Web server that is accessible from the internet. I can't access the Web server through the vpn. All other traffic is fine its VPN. I think that there i