LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot connect to Serial COM device in

Hello,

 

I am trying to communicate to a UltraMotion Servo Cylinder via LabVIEW and cannot seem to find it in the VISA resource name control and cannot figure out why this is.

 

-- I have verified that it is connected to the computer through the Device Manager, and can communicate with it through the Terminal just fine.

 

-- I have made sure the Baud Rate, Parity, Data Bits, and Stop Bits are all correct according to the default values of the actuator (115200, None,8,one) respectively

 

-- I am able to see it as ASRL3::INSTR "COM3" in NI MAX, am able to send commands to it through NI MAX VISA Test Panel just fine as well.

 

However, it does not show up in the VISA resource name control when selecting a resource, only ASRL1::INSTR and ASRL2::INSTR show up. Even though those are not even listed in the device list in NI MAX

 

Any ideas as to why this is?

 

 

Any help would be much appreciated.

 

Cheers,

-T

Download All
0 Kudos
Message 1 of 7
(3,531 Views)

once you have named the com port as COM 3 in max it shoud show as COM 3 in VISA resource Name list. 

Try checking in the device manager of the computer if the com port is detected properly.

Also you can try recovering the unused COM ports in the max. You can go to Tools->NI Serial->recover Unused COM Ports.

If earlier COM 3 was used for some other port and you are trying to use it again it would not allow until you have recovered unused COM ports. Might result in same issue.

0 Kudos
Message 2 of 7
(3,516 Views)

I always suggest starting with the Simple Serial example found in the Example Finder.  Go to Help >> Find Examples and search for it there.  This example is quite close to yours, but yours continually is sending data with no delay and could be disturbing the device causing it to not reply.  The example opens the port, writes some data once, waits, then reads the data and closes.  If it doesn't work there (with the correct baud and other settings) then you could have an issue with wiring.  Is it a null modem connection where TX and RX are swapped?  Or does the device already swap them and a straight through is needed?  Are you sure COM 3 is the right port?  You can try to short out pin 2 and 3 on your DB9 and any data you send you should receive.  

0 Kudos
Message 3 of 7
(3,488 Views)

I have similarly had trouble interacting with serial (COM3) devices occasionally in LabVIEW.  As you did, I could see them in MAX, but they came up with "complicated" VISA names.

 

What worked for me was to go back to the Device Drivers and add the Serial Device (which I had ignored "because I've already installed VISA").  Now, when I open MAX, I don't see the complicated VISA name, I see "COM3", and everything now works.

 

Bob Schor

0 Kudos
Message 4 of 7
(3,482 Views)

I also had a similar experience with a few devices not showing up in LabVIEW but visible in NI Max. I had a couple of workarounds.


First was to write a small VI and use "VISA Find Resource" to force(?) LabVIEW to get the list of all avalaible devices. Then it should show up, and if an Aias was defined that should also show up. In your case it would be either "ASRL3::INSTR" or "COM3". Once it showed up in that small VI, it showed up in all the other VIs.


If that doesn't work, then you can try to typecast the resource string "ASRL3::INSTR" in your VI before you open the session with VISA Open.

 

VISA Typecast.png

0 Kudos
Message 5 of 7
(3,457 Views)

@jamiva wrote:

If that doesn't work, then you can try to typecast the resource string "ASRL3::INSTR" in your VI before you open the session with VISA Open.



No need for the Type Cast,  The string can be wired straight into the VISA Open.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 7
(3,447 Views)

@crossrulz wrote:


No need for the Type Cast,  The string can be wired straight into the VISA Open.

I know. I just have an aversion to coercion dots.

0 Kudos
Message 7 of 7
(3,441 Views)