LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB to 422 Converter Woes

Bill,

I have been trying to use the text-file-uploader VI one made. It looks like it runs alright, but when I list the buffer contents of the MDrive with the 'L' command it shows a lot of errors and missed lines. Changing the time in the while loop changes the errors, but does not make them go away. What do you think?

Sam
0 Kudos
Message 41 of 53
(2,850 Views)
I haven't looked at the text file uploader VI, but you need to be sure to clear the memory of the same program number.  IMS always did a poor job of this.  Myself and other integrators would do the clear command at least twice then list the program to make sure it was gone.
0 Kudos
Message 42 of 53
(2,842 Views)
I haven't looked at this. Once it seemed to run the program I loaded ok, I assumed everything was fine. I'll look at it this morning.
0 Kudos
Message 43 of 53
(2,829 Views)
Sam,

Please try removing the text file parsing portions of the code, and run only the VISA Write operation. Verify that this works, and then build up from there. It looks like the issue might be basic communications with your serial device.
Rasheel
0 Kudos
Message 44 of 53
(2,813 Views)
Hey guys,

I figured it out. The problem was with the timing. I was not giving the buffer enough to time to take and get ready for the next portion of data. I now have the loop waiting 1 second for each iteration and it seems to be working well.

Sam
0 Kudos
Message 45 of 53
(2,804 Views)

I was able to control Mdrives with Labvew only if use the RS232 to RS422 and standart serial RS232 port. The IMS part number is MD-CC200-000.

Using USB to RS422 generates error on Visa Write. Motor in that case still accepts the command. If you ignore the error you can live with that. However writing complex software with self diagnostics

and motor discovery is nearly impossible. The incompatibility seems to be between the IMS driver that emulates COM port and NI Visa driver. 

Eliminate IMSdrive by using standart COM port on computer equipped with one or use thirt party USB-RS232 converter and then use IMS MD-CC200-000 connector.

Given that use standart VISA READ and VISA WRITE send the commands. Use CRLF symbol from Labvew to end the command in nonparty mode ore LF symbol in party mode.

 

Best,

Tochko 

0 Kudos
Message 46 of 53
(2,691 Views)

OK Guys,

I think this solves the problem. Look at the following article: 

http://digital.ni.com/public.nsf/allkb/60DDFED7EFEFE7188625705700750821?OpenDocument

It is not Mdrive alone problem. It is a problem with a lot of USB to serial RS232/(RS-422/485)  adapters. There is some sort of incompatibility with the"Transmit" buffer of these adapters. However if you use "VISA Set I/O Buffer Size" Function

to set the Transmit buffer explicitly (could be the default 4096, but other sizes work too) the error message disappears and everything else works fine. For the MDRIVE limiting the transmit buffer to 4096 is not a limitation at all, because it is nearly impossible for all practical purposes to transmit more then 4096 bytes at a time. 

In the above article they recommend setting both buffers Transmit and  Receive. I have found that the configuration of the Receive buffer is not necessary is a simple VI which illustrates the above solution:

 

Enjoy,

Tochko

Message 47 of 53
(2,606 Views)

OOps,

The VI I have posted is LV 8.6 version which might not be available for some. Here is the LV8.0 version. Sorry I can't save it for earlier versions.

 

Best,

Tochko

0 Kudos
Message 48 of 53
(2,601 Views)

Has anyone tried output control for the mdrive using Labview. I am using the commands S1 = 16,1,0 to enable output 1. Then I used O1=0 and O1=0 to trigger my electronic valve. It seems like any commands I output with an equals sign in them have no effect. Anyone else run into this issue?

 

Thanks,

Dan 

0 Kudos
Message 49 of 53
(2,366 Views)

Found the issue. Swapped out the end of line character for a carrige return.

 

-Dan 

Message 50 of 53
(2,348 Views)