LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LABVIEW VISA ERRORS WITH ARDUINO

Solved!
Go to solution

i tried all these solutions none of them work..i searcched on termination char of arduino.it is null character \0

how can i use line feed or carriage to add this.i tried concatenating still i didnt work.is there any other solun?

0 Kudos
Message 11 of 26
(1,227 Views)

i really tried everything but its really not working.this is related to my project kindly reply as soon as possible

0 Kudos
Message 12 of 26
(1,203 Views)

I don't understand your comment about the Ardino code have a null character as the termination character.  I don't see how that gets defined in that code.

 

What I do see is that you do a Serial.Read(), and by googling that http://arduino.cc/en/Serial/read I see that it returns exactly one byte from the serial buffer.  So I con't know how you expect to work with one byte when you have code that is comparing it to 164, and your LabVIEW code can be sending multiple bytes per write.

0 Kudos
Message 13 of 26
(1,189 Views)

Simply replace the line feed constant with a string constant. Set it for '\' Codes Display. Then type in \0. If you are reading data from the Arduino you also need to replace the termination character at VISA Configure Serial Port to 0.

 

Some systems use null in special ways so it is possible that it may not work.

 

Lynn

0 Kudos
Message 14 of 26
(1,184 Views)

 i tried \0 in spring constant and it doesnt work

0 Kudos
Message 15 of 26
(1,182 Views)

k.. 

0 Kudos
Message 16 of 26
(1,174 Views)

What exactly is a "htoi file"?

 

0 Kudos
Message 17 of 26
(1,166 Views)

when you are sending commands from your Arduino IDE, what termination character are you using .

you can find it in bottom of serial monitor window.

you have not included any termination character in your sketch.

0 Kudos
Message 18 of 26
(1,158 Views)

Let's be clear on terminology.  The original post shows the LabVIEW VI doing a VISA Write.  The arduino text code only shows a "Serial.Read()".  That means the communication is one way FROM the PC and TO the Arduino.

0 Kudos
Message 19 of 26
(1,153 Views)
Solution
Accepted by topic author vanashree

One more thing to take into account. Look at the information in this post.

It is talking about what happens when you open the serial port in LabVIEw to an Arduino board.

 

You need to place a wait before you write anything to the board. Place it just after the VISA "Configure Serial Port". Set the wait to 2000ms.

 

One more thing about your Arduino programming. What is PORTC ?

Message 20 of 26
(1,136 Views)