From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV vi for mfc

Hello Everyone,

                            I am Using MKS Mass flow controller(type MF1 see the attachment) and instrument has USB setup interface and USB process interface, the problem is that I can recognise the device in NI-max as serial and I used the VISA example to send the ASCII message but in return I am not getting any response. I am stuck and everything is coming to squareone.

 

Anyone can help me as where I might be going wrong.

Download All
0 Kudos
Message 1 of 18
(3,544 Views)

@pari89 wrote:

Hello Everyone,

                            I am Using MKS Mass flow controller(type MF1 see the attachment) and instrument has USB setup interface and USB process interface, the problem is that I can recognise the device in NI-max as serial and I used the VISA example to send the ASCII message but in return I am not getting any response. I am stuck and everything is coming to squareone.

 

Anyone can help me as where I might be going wrong.


Is baurdrate, etc. set up correctly?

0 Kudos
Message 2 of 18
(3,516 Views)
What is the exact message you are sending?
0 Kudos
Message 3 of 18
(3,513 Views)

I programmed a very old MKS MFC a long time ago.  It was a very bad interface and I hope that they have updated it.  If you have the baud rate, number of stop bits and data bits and parity correct then it may be the command terminator character.  I remember something funky about needing that as part of the command string.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 4 of 18
(3,509 Views)

yes the baudrate is set to default 115200 with parity none and data bit 8 , stop bit 1

 

for writing I am using byte to array combination and concatenating it with CR and wire it to the write terminal
for reading i am jst connecting a string. I suppose in reading I should get the value bt it showing error as " timeout before reading" 

0 Kudos
Message 5 of 18
(3,500 Views)

aper the manual I have to send    @01--as address C--command which can change, 1.00000---value to set  CR- carriage return 

so it becomes "@01C1.00000 and CR

0 Kudos
Message 6 of 18
(3,493 Views)

Are you addressing it correctly?  What is the exact string you are sending.  This is an RS-485 emulation so you need to address each device on the serial bus which has a master/slave kind of addressing scheme.

 

So each command needs to be prefaced with "@XX" where XX is a two byte ascii reprsentation of the device address as set by the high and low rotary switches.  This is followed by 1 byte command and then an optional value.

 

You should probably create this as a string not a byte array.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 7 of 18
(3,491 Views)

I guess we are cross posting.....

 

The "C" command does not take a value.  So "@01C1.0000\r" is an invalid command but you should get an error.

 

What about the communication indicator lights?  I assume this device is showing up as a serial port correctly and can be opened and the port name read as a property?

 

Is the "OP" status LED showing activity?  I think it should.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 8 of 18
(3,488 Views)

yes I think you are right bt what about reading if it has to read the same kind of ASCII code 

0 Kudos
Message 9 of 18
(3,487 Views)

I also forgot, are you setting the termination character for the read to be a CR?  How do you terminate the read?

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 10 of 18
(3,484 Views)