10-29-2008 04:07 PM
I have located a similar .vi to what I'm looking for named "cn8202temp_controller.vi" out there, but cannot seem to find anything comparable for the CN7800 series.
Omega puts out software named "CN7-B.exe" that does the job, but I'd strongly prefer to integrate this into my LV / SCXI system and leave one window up for control / acquisition of all processes.
I am hoping that I don't need to rewrite this from scratch, as I'm not all that well-versed in RS485 communications.
I've got 4 CN7523s and 1 CN7823 that I will be communicating with, so port mutliplexing or a port hub will be in order.
How can I proceed with this?
10-30-2008
09:13 AM
- last edited on
04-23-2025
03:12 PM
by
Content Cleaner
Hello king10208,
I have looked through National Instrument's Instrument Driver Network and Omega's product page and found nothing that has already been done in regards to controlling the Omega CN7800 Series Controllers. There only information that I could find was the CN7200/CN7500/CN7600/CN7800 - Controller Instruction Sheet.
Section 10 of this document discusses RS485 communication. You should be able to use this information to set up serial communication to your device in LabVIEW using NI-Serial.
Regards,
Dan King
10-30-2008 10:00 AM
I've been looking at that document for a few days, actually. I just don't have lots of experience with serial communications. To be honest, I was really hoping to just stumble into a pre-written vi that I could drop into my own. Darn.
I have seen RS-232 to RS-485 hubs out on the market. I'd assume I need something like that to control the five devices of interest, yes?
I'll install that NI-Serial package and play with it for a bit. Hopefully it'll be simple enough for this simple engineer to figure out... Hah.
Thanks for the pointer to that package.
10-31-2008
10:22 AM
- last edited on
04-23-2025
03:34 PM
by
Content Cleaner
Hello king10208,
You might want to check out some of National Instrument's Serial boards, which offer a variety of baud rates and port counts. If you are interested and you need any more information about any of these devices do not hesitate to contact National Instruments Customer Support.
Regards,
Dan King
11-08-2008 01:02 PM
I've been reading and re-reading Omega's documentation.
I'm unclear on the syntax I need to be using. I've got a .vi running with a variety of analog inputs as well as both analog and digital outputs all running through an MIO PCI card to a filled 4-slot SCXI chassis. That's all running fine, sitting in a nested while loop iterating away.
I'm planning on dropping this comm sub-vi inside a case structure in this while loop. Other items I've seen lead me to believe I'm going to need to issue a squence of ASCII commands in a sequence structure of some sort. The software I _could_ locate for the CN8202 controller uses all VISA commands. It seems to start with a port config, and then head into a stacked sequence where it first writes what seems to be a fairly mysterious string concatenated with a carriage return to the port. It then heads into a property node / read / subset / conversion / close set that confuses me somewhat.
I am communicating fine with the devices (4, actually) remotely using an RS232/RS485 adapter presently using Omega's software "CN7-B" that I mentioned previously. They tell me a variety of Address Registers and what they contain, such as 1000H = Process Value, 1001H = Set Point, 1005H = Control Method, etc. They further state that the fuction codes are 03H = read contents of register (max 8 words), 06H to write 1 word into register, 02H = read bits data (max 16), 05H to write 1 bit into register.
I'm just unclear on how to actually set up a command sequence to accomplish these tasks. I see the 7 vi's in the serial llb at C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Instr\serial as well as a bunch in VISA and easy_VISA. It looks like I need to config a port, open it... you see where my knowledge base is here. Can you point me to an example vi or some such thing to help nudge me in the right direction, please?
Thanks again,
-dmk
11-12-2008 10:25 AM
Hello dmk,
You should be able to find a few good examples of serial communication in the NI Example Finder. If you look under Hardware Input and Output»Serial you can find several good examples. A good one to start with would be the Basic Serial Write and Read VI.
For your particular application you could modify this VI. After configuring your serial port you would use a series of writes and reads to set up your devices and read data from them. Some of the commands would not necessary return a value, but you could use the Bytes at Port Property Node to determine whether or not a read is necessary in some situations. It may look a little complicated as first, but once you get used to your devices commands it should go pretty smoothly.
Regards,
Dan King
11-12-2008 11:05 AM
This is certainly a step in the right direction.
I have the "Basic Serial Write and Read.vi" up, but am still a tad flummoxed. Where in here do I specify which address the instrument is? Each of the guys on the RS485 chain is uniquely addressed 1-8, and I don't see where to separate that out.
Additionally, I am given a number of Addresses for registers of interest. IE, the "Set point (SV)" value exists at Address 1001H.
I am also told the following:
3. Communication protocol: Modus (ASCII or RTU).
Chatting with their engineers, I am assured that the device communicates via the MODBUS protocol.
So, in summary, what would be the "string to write" in this setup to, say, read the Set Point (SV) value at 1001H?
Thanks yet again,
-dmk
11-12-2008
02:44 PM
- last edited on
04-23-2025
03:33 PM
by
Content Cleaner
Hello dmk,
Based on what you just told me you are going to need to take this in another direction. I would advise looking into the Modbus LabVIEW Library. This library facilitates serial communication with Modbus devices such as yours. I would also encourage you to check out the Developer Zone Tutorial: Introduction to MODBUS.
These resources together should be very helpful in getting your system up and running.
Regards,
Dan King
03-05-2009 05:51 PM
Hey King,
Just wondering if you ever figured this out? I'm in the market for one of these temperature controllers and labview compatibility is a must.
Thanks in advance.
03-05-2009 05:51 PM - edited 03-05-2009 05:52 PM