03-19-2021 03:54 PM
For some reason it always changes the state of the DTR line when I run the "VISA Configure Serial Port (Instr).vi" with LabVIEW 2013.
I have tried to set the "Line DTR State" property before and after the VI call, but it does not help. I also have tried to call the "VISA Open" function before I set the property and I run the configure, but it ends up at the same.
I have an Arduino Mega connected to it and the DTR line triggers the reset on the Arduino what I would like to prevent. The DTR state should not change when I access the serial port.
Have you guys any idea how to get around this issue?
03-21-2021 10:08 AM
@michaeluray wrote:
For some reason it always changes the state of the DTR line when I run the "VISA Configure Serial Port (Instr).vi" with LabVIEW 2013.
I have tried to set the "Line DTR State" property before and after the VI call, but it does not help. I also have tried to call the "VISA Open" function before I set the property and I run the configure, but it ends up at the same.
I have an Arduino Mega connected to it and the DTR line triggers the reset on the Arduino what I would like to prevent. The DTR state should not change when I access the serial port.
Have you guys any idea how to get around this issue?
For some reason means "by intentional design" here. Cut the trace labeled RESET-EN
03-21-2021 11:44 AM
@JÞB wrote:
For some reason means "by intentional design" here. Cut the trace labeled RESET-EN
I actually need to be able to reset the Arduino via the DTR line to get into the bootloader and to download updates, but I don't want to perform a reset when I just start my normal communication to it by opening the serial port.
I want LabVIEW to open the serial port but without changing the DTR state during the port init.
03-21-2021 03:22 PM
@michaeluray wrote:
@JÞB wrote:
For some reason means "by intentional design" here. Cut the trace labeled RESET-ENI actually need to be able to reset the Arduino via the DTR line to get into the bootloader and to download updates, but I don't want to perform a reset when I just start my normal communication to it by opening the serial port.
I want LabVIEW to open the serial port but without changing the DTR state during the port init.
That's not the way a port initialize works. you can probably get away without open VISA but, when you do use an Open VISA DTR will toggle. Arduno counted on this behavior to force a device reset.
03-22-2021 03:12 AM
I run "VISA Configure Serial Port (Instr).vi" directly without any other action ("VISA Open") before and I also tried to set the property at first in the configure VI, but the DTR still gets changed.
Even when the first action is to clear the DTR, the DTR internally gets set for a short time period which resets the Arduino.
Read the property back on (11) says it got set properly to 0.
Is there no way to handle the interface on this way, that it does not touch the DTR line during the port init?
03-22-2021 03:28 AM
Hi Michael,
@JÞB wrote:
Cut the trace labeled RESET-EN
Cut the trace on your Arduino pcb, then solder in a switch to enable it at will…
03-22-2021 04:36 AM
@michaeluray wrote:
Is there no way to handle the interface on this way, that it does not touch the DTR line during the port init?
The underlying viOpen() function does a default initialization of the serial port and there is likely nothing you can change about that. And while VISA Open calls that viOpen() function internally, you gain nothing by omitting the VISA Open node, since LabVIEW calls viOpen() anyways the first time it encounters a VISA node that tries to access a specific resource. Each VISA resource name also stores internally the underlying VISA session handle that is ABSOLUTELY necessary in order for anybody to use any of the other VISA functions and the only way to receive such a session handle is by calling viOpen().
11-03-2021 05:54 AM
Hi Michael,
I have the exactly same problem. Did you find any solution to solve the problem so far?
We tried the same way you did, but with no success so far.
11-03-2021 06:28 AM
There isn't in terms of software. VISA allows control of those handshake lines. In order for that to work it needs to initialize these lines when opening the serial port under Windows. If it doesn't it can't later go and decide to want to control it anyhow if you use one of the property nodes. But when it tells Windows that it wants to control these lines eventually the Windows COMM system sets them explicitly to a state.
VISA either has to tell Windows that it wants to use those lines or it would have to jump later through hoops and loops to still be able to control them when you decide to use one of those modem line properties.
11-03-2021 07:29 AM - edited 11-03-2021 07:30 AM
The arduino mega has 4 serial ports. You could connect the computer via a USB to TTL serial adapter on SERIAL 1,2 or 3 and it wont trigger the reset.