LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OMEGA DP41-S -- Help with basic serial write read in NI-Max

Solved!
Go to solution

I want to write a LabVIEW VI to control, monitor, and record data from an OMEGA DP41-S Strain Gauge controller.

We have purchased the optional DP40-S24 interface card for the meter which apparently allows us to use either an RS-232 or RS-485 interface. In the OMEGA manual the DP40-S24 jumper settings are clearly defined for setting up the RS-485 interface and somewhat less clear for the RS-232 interface. However, I have one of each type of interface so in theory I've got what I need to go forward. It sorta seems like they are both working since I get no errors in NI-Max when I send the "*IDN?\n" command in NI-Max, but I get no other response back. At his point, I'm not sure this is a command the OMEGA acknowledges or responds to.

What I am looking for is a set of basic tests to verify that I've got the hardware and interface all setup correctly. From what I have read, I should be able to do this in NI-Max... is this correct? From these tests I assume I will verify that I have things like -- BAUD -- Data Bits -- Parity -- Flow Control -- Stop Bits -- etc, are properly configured. Then I can move on toward development of basic communications with the DP41-S unit.

The OMEGA DP41-S users manual has a large table of the characters that make up the commands. I am seeing references to both Hex and ASCII string input so I would really like to have some examples so I can understand better how the strings are to be formatted. However, I have not yet found the simple minded example command strings to simply ask "Can you hear me" and "What is your name". I'll continue to study my manual on this but if someone is ahead of me in their understanding of what I need and willing to share, I would appreciate some fundamental education on this.

From these basic tests I will move forward with my LabVIEW VI development. I have in fact found an example VI that has some of the basic pieces that I could build from... I'm just not that far yet.

0 Kudos
Message 1 of 11
(2,424 Views)

When I get a new piece of equipment I always like to use the software provided to make sure it can at least communicate before trying with LabVIEW.  That way you know it works and then figure out how to make it work with LabVIEW.

 

Section 8 in the communication manual has a command and response section that gives some examples that should help some.

0 Kudos
Message 2 of 11
(2,403 Views)

Not sure if this will help or not.  Used one of those a while back, had it connected to a load cell.

 

I don't have anything developed in NI-MAX, but here is the code I used to grab the load from the indicator.

 

Hope it helps!

0 Kudos
Message 3 of 11
(2,396 Views)

Both of those replies are useful to me... and I think I am making some progress.

 

I called and talked with Omega Tech Support and a really swell fellow named Richard helped me out. He said their was an addendum to the OMEGA DP41-S user manual that gave the proper jumper settings for using an RS-232 interface. He emailed me that addendum and low and behold, the jumper settings are not the same between the RS-485 and the RS-232. Without the addendum I would not have known how to use the RS-232 interface. Since that was our preferred interface this info proved to be of great value and solved one of my fundamental problems.

 

I didn't get any OEM software with this project although everything was brand new, it had been opened and I didn't get the control software disc (if it was there initially). So I read more of the manual and dug around a bit and discovered that the OMEGA DP41-S is the same unit as the Newport INFS. (Apparently Newport makes the DP41-S for Omega). At the Newport Website http://www.newportus.com I was able to find their control software for the INFS controller.

 

Finally, Using the "Infinity and Beyond" software from Newport, I was able to talk to the controller from my PC using the RS-232 interface. I can read and write to the controller although I am still getting what appear to be some random communication errors which occasionally lock up the software so maybe still something needs to be tweaked. But it's progress. I'll keep looking and verify that Baud and Bits and everything is lined up and hopefully solve that issue as I move forward.

 

I did try to write and send commands using NI-Max and so far nothing is working, but that may or may not be significant. Next I am inclined to try the basic VI provided above and see if I can get some positive results going that way. If so, I can move forward in my LabVIEW code development.

 

Thanks for the help!

 

 

0 Kudos
Message 4 of 11
(2,376 Views)

Chas70 -- are you willing to share your VI with me?  I've had some success with the Infinity software but so far I haven't succeeded with anything in my LabVIEW efforts.

0 Kudos
Message 5 of 11
(2,353 Views)

Attached is a screen shot giving a look at the parameters that appear to be working in communicating with the OMEGA DP-41S using the Newport Infinity Software.

0 Kudos
Message 6 of 11
(2,350 Views)

Now here is a look at the VI I am developing - you might recognize that it is largely borrowed from a similar VI that apparently worked for someone. This was available in the forum pages and I have modified it slightly to match my parameters. Lemme know if you see something that is obviously wrong with my code.

 

I am picking up an error in the VISA read module... not sure if this means I can't read what's there or if there was nothing written there to be read?  Any thoughts?

0 Kudos
Message 7 of 11
(2,349 Views)

Are you sure that *IDN?\n is a valid command for the meter?  Not every piece of equipment will respond to that command.

You will need to read the communication manual for the meter to see what the proper commands are.

0 Kudos
Message 8 of 11
(2,324 Views)

@_Bryan wrote:

Are you sure that *IDN?\n is a valid command for the meter?  Not every piece of equipment will respond to that command.

You will need to read the communication manual for the meter to see what the proper commands are.


I tried that among a handful of other standard commands but the real problem was that I hadn't yet established communications between my computer and the OMEGA unit using LabVIEW. However, I knew I was on the right track since I had the native Newport Infinity Software and the OMEGA meter talking to each other. OMEGA Tech Support was a bit surprised to learn that I was using modern computer communications to work with this meter. (The circuit boards inside this have a manufacturing date in 2002).  They said it's been quite a while since we did that sorta thing around here and last time we did we used Hyperterminal. They were helpful and all for the project... terrific at running the meter from the front panel but this sorta moved things outside their support area.

 

Finally, after a bit more study and determination, I identified the fundamental communications error. As I worked at it I discovered that the VISA serial module I was working with was a VI unto itself and once I opened that up I had access to all the RS232 parameters and found a few more items to adjust. That would seem simple enough but, even though some of those same parameters were set at the start of my VI, those within the VISA VI remained at some default values that differed from those I previously specified... I had to go in and set all the parameters in the VISA VI and save my values as default.

 

Viola, I have basic communications working in LabVIEW. Now I can begin to develop my VI and begin to work with the commands in the OMEGA communications manual.

 

Thanks for the help.

 

Download All
Message 9 of 11
(2,295 Views)

To satisfy the NI request to mark this problem as "Solved"... I'm not certain how to respond to that. I was hoping to use NI-MAX similar to how we used to use Hyperterminal to do some basic trouble shooting in serial communications. However, I solved the actual communication problems otherwise and the use of NI-MAX was not part of that solution.

0 Kudos
Message 10 of 11
(2,268 Views)