Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone controlled a IMS microdrive23 motor with LabView?

I am trying to us a Inteligent Motion Systems (IMS) microdrive23 motor/driver with LabView and am having trouble with the serial communication to the device.  I can communicate to it through their terminal software.  The device comes up as a Com port on my computer even though it is connected through the USB port as they have supplied a USBtoCOM port driver.  But I am still not able to get it to communicate through the Basic Serial Read/Write.vi.   Has anyone used these motors with LabView before and can help me get communication started with them?
 
Thanks for your help!
0 Kudos
Message 1 of 15
(5,341 Views)

What version of LabView and NI-VISA do you have loaded?

Does the device show up as a COM port in MAX under "Devices & Interfaces"?  If it shows up in MAX and communicates with a terminal program, NI should have no problem talking to your device.  What kind of errors is your vi generating?

0 Kudos
Message 2 of 15
(5,327 Views)
Have you tried Windows Hyperterminal as a sanity check before attempting to communicate via LabVIEW?
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 15
(5,323 Views)

I have LabView 8.2 the newest version and Visa installed.   I can see the Com5 on Measurement and Display and when I go to the Visa Test Panel, I can read the initial start up message from the device when it is first powered up.

It give the following when I do a read.

Copyright\xa9 2001-2006 by Intelligent Motion Systems, Inc.\r\n

I think my problem lies in the communication setting on this device.  I am not very familiar with all the settings and I just know what I need to set for the Baud Rate (9600), Data Bits(8), Parity (None), Stop Bits (1), Flow Control (none).  Maybe you can help me with the other setting on the Visa Test Panel that I might need to get it to read what I send it. 

I tried to send it a request to send back the device name (pr dn) and when I did a read, it read back the same thing (pr dn). Maybe that will help you see what I am doing wrond.

I also tried as suggested to communicate to the device with Windows Hyperterminal and that was succesful!

I think I am close to getting this working, just need a little help.  Thanks in advance for any information you can give me!

 

 

0 Kudos
Message 4 of 15
(5,308 Views)

Hi again,

I tried to communicate to it with the Basic Serial Read and Write.vi and this is the error message that it returns

Error -1073807246 occurred at Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->Basic Serial Write and Read.vi

 

 

Possible reason(s):

 

VISA:  (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.

 

Maybe you can see from this what is not getting set right.

 

Thanks

 

0 Kudos
Message 5 of 15
(5,307 Views)

That error sounds like another program is running and has not closed the port. Did you exit Hyperterminal and their communications software before running MAX or your LabVIEW code?

If it worked in Hyperterminal, then I suspect if you use \r\n as a termination character in the read portion it may work in the LabVIEW serial read/write vi.

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 15
(5,303 Views)
Make sure you include a VISA Close in your vi and make sure no other programs have the port tied up.  If you suspect that Labview has the port hung, exit and restart Labview.  Labview will close all active VISA sessions when you exit.  If you think something else has it hung, you should probably reboot the machine. 
 
I looked at the docs for this device.  Looks like the termination character you send depends on the the settings for Echo Mode, Parity and Checksum.  What settings are you using?
0 Kudos
Message 7 of 15
(5,291 Views)
I've been working with the IMS 483IE which uses similar communications. Try the attached VI and see if you get results.  Make sure you use the proper terminator on the command you want to send;  \r   or \n



0 Kudos
Message 8 of 15
(5,245 Views)
Are you sure that properties selected for COM port in use are correct? With properties i mean Baud Rate & Co that you can configure with block of serial configuration in Block Diagram of your VI. The error you have met is like error that is shown when you select wrong COM port or when the parameters are incorrect. I don't use microdrive but i've used cable USB-COM and i have met the same error initially.
0 Kudos
Message 9 of 15
(5,238 Views)
Thanks Tariah for sending me the vi.  Unfortunately it doesn't work either.  A little progress has been made.  I was able to communicate with the device with Hyperterminal.  Then I did find that if I set the delay time to about 5 sec, that I could receive (i.e. serial read works) the start up message that is displayed when the motor is first powered on.  I was able to do this only when I disabled the serial write portion of the Basic Serial Read/Write.vi.  When ever I try to write something to this device, it gives me this error
 
1073807298 Could not perform operation because of I/O error.
 
I have tried all the settings that work with Hyperterminal (i.e. the Com5, Baud Rate 9600, data bits 8, parity none, stop bits 1, flow control none) 
 
I think this is were the problem lies, but I am not sure what the problem with the write command is.  I have tried to send it a simple command such as
 
pr a
which is print the acceleration.  This works fine in Hyperterminal and the IMS Terminal software, but I just can't get the darn thing to communicate with a LabView VI!!!  It is frustrating and any help you all can give me would be great.
 
Tariah, what commands do you typically send to your motors?  Do you know what the ascii string is for CTRL C?  This is what they want to send to it to reset the motor.  Also, do you use CR or LF for a terminator?
 
Thanks for all your help and hopefully I can get this thing to work soon.  I hate devices that should be so easy that take for ever to get something simple to work.  When will vendors wake up and smell the roses and make their devices LabView compatable with Instrument Drivers!!!
 
BlueEyes76
0 Kudos
Message 10 of 15
(5,210 Views)