LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA serial communication timeout issue

Hello everyone 🙂

 

I’m fairly new to LabView and currently struggling to find the issue regarding

my current setup. It consists of two Stepper Motor Controllers by Nanotec: SMCI33-1

These are interfacing the commands from my LabView program to the physical motors.

 

What worked so far:

I was able to setup the communication with one SMC (COM3) using the VISA-Interface and configure the motor to my needs. Nanotec provided LabView-SubVIs to interface the commands, but they are basically using VISA-Functions for that. I included my SubVI Motor-probe.vi (meaning motor-test, it's German) which uses the Nanotec-write-read.vi and the open-visa.vi, both of which Nanotec provided. The Motor-prove.vi is being used to test if a controller is executing simple commands like setting the steps, shaft rotation, speed etc.  

 

All of this was pretty straight forward and the first controller/motor (COM3) is performing as expected.

 

The Issue:

The communication to the second controller is timing out at the VISA Read block. Further research has shown, that this probably happening because the VISA Read function is waiting for a termination character which it is not receiving. Please correct me if I’m wrong.

 

The curious thing is, that the first controller is executing all commands and the second one just times out at some point. 

 

Troubleshooting:  

 

So the first thing to do was to whip out the manual and check out the device configurations in NI MAX.

Both controllers had the same configurations and I’ve attached the screenshots of them.

 

Now according to the manual a command "ends with a carriage return '\r' ". I've tried changing the I/O settings via the VISA test panel, enabling Termination Characters and selecting the Carriage Return etc. 

I've tried the Basic I/O commands (*IDN?\r; *IDN?\n etc.) all of which return the same timeout error but for both controllers.

 

Even though it was not specified in the manual, I also tried almost every other I/O setting (e.g changing Timeout time) or assigning the faulty controller to a new COM-port, to see if it made any difference. 

 

Now I'm worried that I didn't even setup the serial communication to both controllers correctly, even though one of the controllers is working. I also checked the drivers on both controllers via the Windows Device Manager and they are both running the same drivers. 

 

Any ideas and tips regarding further troubleshooting? 

Thank you so much in advance.

 

cbm

0 Kudos
Message 1 of 7
(3,128 Views)

If you're not using NI genuine VISA controllers you need to set the VISA Read to "Synchronous" mode.

 

I'm controlling simultaneously multiple CNC GRBL controllers and I found (after reading in the NI forums)  that if using the default "Asynchronous" mode for VISA Read I get any kind of weird behaviour. 

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

Thanks for your reply. Unfortunately changing from asynchronous to synchronous didn't change the behaviour.

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

What's a "VISA" controller?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(3,054 Views)

As far as I know VISA is a general interface for all kinds of instrumentation. So there probably aren't any instruments built to function specifically for the VISA API. 

 

My guess is that I could have a driver issue/configuration issue and I've contacted Nanotec about it. It's just concerning, that the program executes on one SMC, BUT the VISA testpanel returns a timeout error for BOTH SMCs. I will keep this forum updated.

 

cbm

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

Are you sure the instruments are even SCPI-compliant?  If they aren't it's likely a *IDN? instrument ID query will be met with a timeout...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 7
(3,003 Views)

I contacted the manufacturer about it.

 

That would explain why one of SMCs executes the commands specified in the programming manual. It didn't mention SCPI though, only specifying the command structure the SMCs accept.

 

Then there would still be the issue with the second SMC which times out at the  VISA Read function.

0 Kudos
Message 7 of 7
(2,978 Views)