LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No command processed using "IMAQ Serial Write.vi"?

Hello,

 

I am trying to address serially a Pulnix TM-6740 CL camera connected via a Camera Link cable to a NI 1428 PCI board. As the camera file does not support all parameters to be set, I need to use IMAQ Serial Write. In particular, I am interested in adjusting the Gain A/B values, which can be done e.g. for channel A using the following command line: ":MGA=DDD\r". Here the start character is ":", the end character "\r", and DDD represents any hexadecimal number between 085 and 1E8.

 

The problem I have is that using IMAQ Serial Write, apparently no serial command is sent to the camera, i.e. changing the Gain A value -- which I convert from an integer number (range 133-488) to a hexadecimal string -- does not result in any change of the image. I have double-checked the Vis I am running and it seems to me that everything should be OK. I do not get any timeout error or anything similar.

 

On the other hand, the command line mentioned above works perfectly well if I test the serial connection using the NI Camera File Generator 2.0.2., i.e. the images changes as expected.

 

I am really a bit confused, but there must be something I am missing here. I attach the Sub-VI which contains IMAQ Serial Write.

 

 

Any comment will be appreciated!

 

Benjamin

0 Kudos
Message 1 of 3
(3,136 Views)

Did you ever resolve this issue with the IMAQ Serial Write.vi? I am having the same problem with an IR Imaging Camera.  I need ascii characters sent followed by x0FF, then \r\n.  I don't see command string getting throughsent through.  I get an error -1074397163.  However, with Hyperterminal I see IR Camera responding accordingly to commands.  Any one have any suggestions or alternatives?

 

Thank You,

 

Larry C.

 

lcachuela@irvine-sensors.com

eagle_sec@yahoo.com

0 Kudos
Message 2 of 3
(2,619 Views)

Hi Larry,

 

sorry for the huge delay, today I have taken notice of your post just by coincidence.

 

In case this is still of interest, I must say that I was not able to resolve the issue with the IMAQ Serial Write.vi. I circumvented the problem by modifying the camera file with the NI Camera File Generator and using the IMAQ Set Camera Attribute.vi instead. This way, within LabVIEW all numerical attribute values can be delivered as integer strings. The translation to hexadecimal numbers for some of the serial commands understood by the Pulnix CCD is then done within the camera file by means of the expression "%03X", which results in a 3-digit hex number.

 

I add an example from the camera file that corresponds to the shutter setting:

 

...              Name (Direct Shutter) {
                     Attribute (Shutter Setting) {
                        Value (Integer) {
                           Min (0)
                           Max (480)
                           Increment (1)
                           Display {
                              Multiplier (1.000000)
                              Offset (0.000000)
                              Precision (0)
                              Units (0-480)
                           }
                           Default (0)
                           Current (0)
                           Action (Serial) {
                              Command (:DSH=%03X\r)
                              Response (:o\r)
                           }
                        }
                     }
                  } ...

 

If you have not yet solved your problem, maybe this could be useful.

 

Kind regards,

Benjamin

0 Kudos
Message 3 of 3
(2,560 Views)