LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please help for connecting the masterflex L/S driver 7550-50 via RS232 in/out!!

I am using the serial VI to connect my device via RS232 with Labview. The device (masterflex L/S driver 7550-50) has two DB9 ports including RS232 in and RS232 out. I used usb to DB9 converter and set the in-port in COM1 ; out-port in COM2. In the Measurement & Automation window, I could see the COM1 and COM2 in the list. And using the Basic Serial Write and Read.vi, I modified the read VISA source in COM2 for read the signal from device. Here is the problem......
 
After testing the Basic VI, the total process  is ok without any error dialog but the reading string is always empty. Whatever strings in write VI I tried, I couldn't get any responce from the device. That's confusing me a long time....
 
By the way, the manufactory provides a commerical software to control this pump. I also tried this method to connect the pump through COM1 and everything is fine.
 
My Labview versioin is 8.21
NI-VISA is 4.2
 
Could anyone give me some suggestions? Thanks a lot!!!
 
azy
0 Kudos
Message 1 of 9
(8,992 Views)

You could be specifying the wrong com settings, send the wrong command, or not terminating the command incorrectly (i.e. not appending a LF or CR). The use of two different com ports is also very strange. There is no reason to use one com port for sending data and another to receive.

You might want to first try using a terminal emulator program such as Hyperterminal to see if that works. You can also do a serch for a program called portmon. This program will allow you to monitor the actual communication that the vendor's program is doing. You say that the vendor's program works with Com1. does that mean you don't have Com2 connected? In any case, portmon should tell you whether you need both com ports.

If you have an electronic copy of the manual (or a link to one), can you attach that so that someone can see what it says?

0 Kudos
Message 2 of 9
(8,978 Views)
Thanks for Dennis's relpy!!
 
After reading your suggestion, i read the manual carefully and found the purpose about the RS232-out port. It's using for the connection of nest pump. The only RS232-in port is using for the connection of host computer!
And I also tried the programm "portmon" and "Hyperterminal"  to test my connection between device and computer with the vendor's software, after all, I could get the signal like these.
 

46 0.00094062 winLin.exe IOCTL_SERIAL_WAIT_ON_MASK         Serial6 SUCCESS  
47 0.00000391 winLin.exe IOCTL_SERIAL_GET_COMMSTATUS  Serial6 SUCCESS  
48 0.00000251 winLin.exe IOCTL_SERIAL_GET_PROPERTIES    Serial6 SUCCESS  
49 0.00041989 winLin.exe IRP_MJ_WRITE                                       Serial6 SUCCESS  Length 6: 02 50 30 31 49 0D  
50 0.00000363 winLin.exe IOCTL_SERIAL_GET_COMMSTATUS   Serial6 SUCCESS  

So, what's the nest step about using labview to control my device? There's one little question about the Write-VISA.vi. What should I put in the writting string, like <STX>P01S+0500.0G<CR> or just using the Hex above "02 50 30 31 49 0D" ?

Thanks a lot and appreciates your responce very much!!!

azy

following is the electronic copy of the pump-manual!

 http://www.coleparmer.com/catalog/manual_pdfs/07523-60,-70.pdf

0 Kudos
Message 3 of 9
(8,965 Views)
You can right click on the string control/constant and select 'Hex Display' and enter everything in hex if you want. Another way is to use the concantanate string function have have the prefix/suffic (STX/CR) as constants and provide the command. Something like below.
0 Kudos
Message 4 of 9
(8,962 Views)
Dear Dennis, after trying the way you suggest, I could control the pump by labview!! using the write strings in the under order: 1. <ENQ> : change the string type in "\ type" and the hex for <ENQ> command is 05, so give the command "\05" to make sure the device is turn into the connection status. 2. <STX>P01I<CR> : this command can define the first satellite in P01, and the command in \ type is \02P01I\r , the \02 means <STX> and \r means <CR>. 3. after setting the satellite, I could use the other command to get the response from device. Mostly, the response is "\06" means <ACK>.  Thanks to Dennis, I am appreciate your help!! Smiley Happy 
0 Kudos
Message 5 of 9
(8,953 Views)

Hi,

I tried to communicate with the masterflex L/S but unable to do it.

Would you send me a sample vi.

 

Thanks.

 

SL 

0 Kudos
Message 6 of 9
(8,725 Views)
Masterflwx's manual does not define baud rate, parity, stop bits....  what values did you find that work?
0 Kudos
Message 7 of 9
(8,619 Views)

Could you help everyone here and post your VI?  We've been having problems with this as well.

 

Thanks so much!

 

 

0 Kudos
Message 8 of 9
(8,388 Views)

Previous discussion was very useful.

Here is a complete program for a single channel pump.

It could be useful  for new comers

Message 9 of 9
(7,388 Views)