LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino Uno+Labview 8.5

Solved!
Go to solution
A good way to debug is to use I/O Trace. This is turned on in MAX. Capture the traffic when sending the command from MAX and capture when you use the example VI.
0 Kudos
Message 11 of 31
(564 Views)

Thanks for this suggestion. Please have a look at the IO trace attached. 

Lines 1-9 lines are the trace of using NI MAX. 

Lines 10-14 using my vi sending just the command

 

Is there a difference between ASRL4::INSTR and COM4?

Thanks

0 Kudos
Message 12 of 31
(558 Views)

Oh Sorry the trace file cannot attach. 

One difference is in the name. But I get only COM1 COM4 LPT in the options for the resource name. no ASRL.

I will try to paste the trace if needed.

Message 13 of 31
(556 Views)
ASRLx is the canonical VISA Resource name and Comx is the alias. There is no difference here.
0 Kudos
Message 14 of 31
(550 Views)

The trace file is attached. First 2 lines are from executing command on NI-MAX and others are on running the attached vi.

Can somebody please tell what needs to be corrected? 

Thanks

Download All
0 Kudos
Message 15 of 31
(537 Views)
Sorry, I don't see anything wrong. Are you sure the serial configuration in MAX and in the VI are the same? You can actually skip the configuration in the VI and the MAX set-up will be used. Your VI would then have nothing except a VISA Write.
0 Kudos
Message 16 of 31
(524 Views)

Thanks Dennis. Before this, I had made a vi with only VISA Open, Write, Close. It didn't work. So tried to use config.

It is not responding to IDN query with VI but is respondin to IDN using MAX with return count 6. 

In case it helps, I can't find visaconf.ini even after showing the hidden files and folders in the location C:\VXIPNP\WinNT\NIvisa. But COM4 is opening up on MAX as ASRL4 so that shouldn't be a problem. I can't think of anything. 

 

0 Kudos
Message 17 of 31
(516 Views)

Just one small comment.

The "Return count" out of VISA Write.vi has nothing to do with what your device is returning to a given command.

 

 

0 Kudos
Message 18 of 31
(510 Views)

I used a Serial port monitor. Ran the command on MAX at 13:52, closed MAX at 13:53.

Ran the VI at 13:54:01.

 

RTS control signal is cleared as well as 'request cancels the specified requests' before closing the com port all at the same instant 13:54:01!

How do I prevent this clearing of buffers and cancelling of requests before vi close?

The port activity can be seen in the txt attached.

 

0 Kudos
Message 19 of 31
(492 Views)
You just don't have millisecond resolution. The operations are not taking place at the same time.

The operation in MAX sent idn and not I5000 but the LabVIEW sequence does show the cr and lf being sent.
0 Kudos
Message 20 of 31
(480 Views)