LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I start communication with inficon XTM/2 deposition monitor?

Hi! 
 
I'm trying to get started with data logging for an Inficon XTM/2 deposition monitor.  I'm in the first stages of learning how to do anything with Labview, so all I wanted to do was send a message to the monitor and receive a response.  The XTM/2 manual says that I should send a message which is:
 
message_string ACK  
 
I should then receive:
 
message_string ACK  or error_code NAK
 
What I have is the above send message sent  as a string into the write buffer of a VISA Write Icon.  The VISA Write Icon also has a VISA Resource Name Constant attached to the Visa Resource Name of the VISA Write Icon, and I have COM 1 selected since I am trying to connect to the XTM/2 via the com1 port and an RS232 cable. The VISA Write Icon is connected to a  VISA Read Icon, which is also connected to the Visa Resource Name via the Dup VISA Resource Name wire from the VISA Write Icon.  I also connected the error out from the VISA Write to the error in of the VISA Read.  I have a numeric value of zero connected to the byte count of the VISA Read, and the read buffer from the VISA Read is connected to a string indicator.  When I run the program I get a flashing light on the front of the XTM/2 that says "RECEIVE," but I don't get anything sent to the string indicator on the Labview Screen.  Any ideas of what I did wrong?
 
Thanks for the help!
 
Piet
0 Kudos
Message 1 of 9
(4,745 Views)
How are you sending the ACK? This is a special control code and is not sent by typing the letters 'A', 'C', and 'K'. ACK is a hex 06 and you can set your string control/constant for either hex display or '\' Codes Display (right click on the control/constant) and enter it. If you use '\' Codes Display, enter \06 at the end of the message. A NAK is hex 15.
Message 2 of 9
(4,740 Views)

Dennis,

Thanks for the help!  I put in the \06 command and I am now getting something back from the XTM/2, but only if I put in 0-4  bytes into the byte count on the VISA Read Icon.  Also, what I get out on the output on my front panel is:

 half-circle square half-circle square

Do I need to convert the output from the VISA Read Icon before I send it to the String Output Icon?

Thanks for the help!

Piet

0 Kudos
Message 3 of 9
(4,729 Views)
It sounds like the instrument returns hex. You can right click on the string indicator, just like the string control, and select hex display. You can use String to Byte Array to convert to an arry of U8's. Other conversions may be necessary, depending on the instrument. The manual for it should have some sort of explanation. If you can attach an electronic copy of the manual, that would help.
0 Kudos
Message 4 of 9
(4,725 Views)

Thanks for all of the help so far!

I now have the lines of communication open with the XTM/2 and I am getting the value that I should back (2.297 kA), but I am now having trouble logging the data.  I was trying to output the time and the reading (2.297 kA) to a spreadsheet, but when I open the spreadsheet there is only one data point with one reading and one time.  I don't know if the others are being over written, and if so how I would stop that?  I also was curious to know how to define the frequence of data logging (say one data point every 0.5 seconds).  Attached is the file that I tried to write!

Thanks for the help!

Piet

0 Kudos
Message 5 of 9
(4,716 Views)
You've wired the results out of the while and to the Write to Spreadsheet File. When you do this, you only get the last result. You would need to create a 2D array of all of the results in the while loop. One way to do that is to right click on the exit tunnel and select 'Enable Indexing'. You would then wire this to the 2D array input.
 
If you want to log something at a specified interval, the simplest way is to move the Write to Spreadsheet to inside the loop and set the Wait Unit Next ms Multiple to the interval you want.
Message 6 of 9
(4,707 Views)

So, now I got the data logging going great.  But for some reason when I stop the run, when I try to start it again, It will only log one data point and then stop.  I then have to go in and manually reset the while loop to get it to start logging again.  Is there a way to do this automatically?  Also is there a way to put a button onto the front panel that will start the while loop instead of clicking on the arrow on the top menu?

Thanks for the help!

Piet

0 Kudos
Message 7 of 9
(4,699 Views)
You click on the stop button and it stays true. So, the next time you run, it reads the status of the stop button and stops. A while loop always runs a minimum of one time. To fix this, click on the stop button to change it to false and then right click on it and select Mechanical Action>Latch When Released. This is the default for the Stop button on the Boolean palette so you must have changed it at some point. This type of button will return to the false state as soon as it has been read.
 
If you want your VI to start as soon as it has been opened, go to File>VI Properties>Execution and check the Run When Opened box.
 
You might also want to look into some LabVIEW training. Look at all of the links that tst has provided.
Message 8 of 9
(4,692 Views)

Thanks again for the help!  You are definitely right, I do need some Labview training!

Thanks again!

Piet

0 Kudos
Message 9 of 9
(4,686 Views)