From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232

Hello everyone,

 

I want to establish communication between a camera and CMUcam4 Labview. This one is connected via RS232 to a USB port and appears on com3. I can communicate without pb thanks to Hyper terminal (the mikroC and of Paralax) but I can not communicate with MAX (Measurement and Automation eXplorer) the LV assisrant NI instrument.  In mikroC, I have data format ASCII , new line settings : CR and append new line.

With the assistant instrument under Edit VISA resource settings, I have in the device status: This device is working properly. When I made ​​a simple write like ordering stage: L1 10 that is to flash the camera del  at 10 Hz, the command does not run.

The speed, the number of stop bits ...., that's good. My problem just probably the configuration of carracter before and after read and write, I've tried everything.

See files below

It's been two days that I turn around and I'm looking on this forum among other things but I can not get out.

Could anyone help me please

 

kind regards

0 Kudos
Message 1 of 6
(5,428 Views)
You aren't appending a termination character. Use a \r for a carriage return or \n for a line feed.
0 Kudos
Message 2 of 6
(5,418 Views)

I ve tried \r and \n both with VI:" Basic serial write and read" and MAX and it does nt work. You can find below copy of screens of VISA test pannel: configuration and results with the error. Note on screen 4: View attributes, there is an error, but i don't know where it come from.

 

Thanks

Download All
0 Kudos
Message 3 of 6
(5,411 Views)
The error in screen four can be ignored. The property is only for NI devices.

Show your serial setup, please. Is the command case sensitive? Enable the termination character for the read as well.
0 Kudos
Message 4 of 6
(5,399 Views)

thanks for your help

 

On the copy of screens below you will see the configuration I have tried according to your suggestions. I hope I have understood correctly :
\r puts carriage return character after Write operation
configuration of I/O setting puts a line feed after read operation

Is that right ?

Download All
0 Kudos
Message 5 of 6
(5,375 Views)
The I/O settings say to terminate a read as soon as a line feed is detected - no matter how many bytes you specify to read.

Are you getting anything at all back? If not, that would indicate to me that something is wrong with the write but I can't see anything right now, sorry.
0 Kudos
Message 6 of 6
(5,365 Views)