05-01-2020 10:14 AM
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
05-01-2020 02:40 PM
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.
05-01-2020 03:30 PM
Thanks for your reply. Unfortunately changing from asynchronous to synchronous didn't change the behaviour.
05-01-2020 06:01 PM
What's a "VISA" controller?
05-02-2020 04:13 AM
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
05-02-2020 03:15 PM
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...
05-03-2020 03:09 AM
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.