Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface Extech IR Tester 380366 with LabVIEW 8.0

I have a project where I am trying to use labVIEW to control an insulation resistance tester made by extech model #380366. I am trying to control this device through the RS-232 Port. I actually found an example in the LabVIEW help files where I can input a hex code through RS-232 but I can not seem to get the instrument to respond correctly. In the data sheet it gives me a list of commands that control the function of the IR Tester and what the instruments response should be based on the command. I am just trying to start by doing something basic. You can turn a backlight on the meter by simply sending a command in Hex to the device so this is what I am starting with I just can not seem to get it right. The example I am using does seem to get a message back from the instrument but not what the command protocols says it should be. Does anyone have any experience with extech instruments. I have attached the command protocol I have recieved from extech could someone let me know if this is possible. I am starting to think that extech is withholding information on how to program this instrument because the command protocol seems like it is missing information. Please help someone am I crazy.

 

Thanks for the help.

0 Kudos
Message 1 of 10
(5,258 Views)
Is that all of the documentation? In the VI you posted (in the other thread) you have some bytes, but other than 2A I cannot find the other byte values in the documentation you provided.
0 Kudos
Message 2 of 10
(5,247 Views)
Yes that is pretty much all of the documentation I have at this point. I do have the user manual for the IR tester but that does not say anything about programing the instrument. In the vi that I attached I believe it will open with some random values in the string to write control I always change this. I also have been changing the string to write control to display a hex value. An example of a command I have been using is 01 21 80 77 I beleive that this should turn the light on to the instrument. It is weird because when I try to use this command the vi gets no response back from the instrument but when I type instruction 16 01 08 FF FF 77 The vi will get a response from the instrument one iteration the response will be EE then the next will be CCFF and each iteration cycles between these two responses. I know I can probably not even begin to understand what these codes mean without more information from extech.
0 Kudos
Message 3 of 10
(5,218 Views)

I'm assuming that when you say "iteration" you mean simply running the VI again, since there are no loops in the VI. I'm also assuming that with subsequent runs you turn off the "write" and just perform a read.

 

I would agree though, that you should get more information from the manufacturer. 

0 Kudos
Message 4 of 10
(5,206 Views)

Thanks for the help. I have tried several different things so at one point I ran the code in a while loop so I could change the commands while running to see if I could get anything to happen with the instrument.

 

I did not understand what you meant when you wrote

 

"I'm also assuming that with subsequent runs you turn off the "write" and just perform a read."

 

Does this mean I should only try to read or write and not both? I have tried leaving them both on, I have tried just writing an instruction to turn the light on to keep it simple. I have left them both on because the Extech command protocol says the instrument should give a response.

0 Kudos
Message 5 of 10
(5,198 Views)

Hello Geoff1,

 

I was wondering if you could try 16 01 21 80 77 instead of  01 21 80 77.  It seems like you have to preceed the commands by 0x16.

 
It may be a little early in the development process, but if you are interested in making a complete instrument driver, you can create an instrument driver project by going to tools -> instrumentation.  Once you complete the development, you can submit your driver on www.ni.com/idnet so others can use it.

 

Please let me know if this helps.  Have a great day. 

O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 6 of 10
(5,194 Views)

I appreciate the help. I tried what you suggested but It does not turn on the light and the response from the device is still just EE and CCFF. I will need to talk with extech to see what this means. I also saw a driver for an extech sound level meter maybe I will take a look at this to see if it can help me out any.

 

Thanks

Geoff

0 Kudos
Message 7 of 10
(5,191 Views)

I have a new idea and am looking for any suggestions.

 

The extech 380366 Insulation Resistance tester comes with software (not Labview) that you can use to control the device. Is there a VI that will allow you to monitor the transmit and recieve lines of the RS-232 without interfereing with the operation of the device?

 

What I would like to do is use the software supplied with the device to control the instrument manually and see what bit sequences are sent to the device over the transmit and recieve lines. I think this will solve the issue of the not having very good documentation of the command protocol. I should be able to determine what the bit patterns are for each of the functions and program it that way. Any suggestions would be great.

 

0 Kudos
Message 8 of 10
(5,173 Views)

Hello again,

 

You can try using portmon, a free application that monitors all API calls to the COM port. 

 

You can also post your captures on the forum if you need more help.

 

Have a great day. 

O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 9 of 10
(5,166 Views)

Success

 

Thanks for all the help with this. We already had a program that could monitor the ports so we used that instead of portmon.

 

We monitored the port while operating diffrent functions of the device through the supplied software. Then we were able to see the pattern of the commands sent to through the RS-232 port. We then used this pattern and were able to turn the light on to the device. So now we are getting somewhere I appreciate everyones help with this issue. I dont do enough programming so my experience is few and far between but is it just me or was that command protocol sheet really hard to understand its probably just me. Either way I will take another look and see if it makes sense now. But thanks again everyone for the help you all have been great..

0 Kudos
Message 10 of 10
(5,159 Views)