05-15-2009 06:39 PM
Dear NI Engineer,
I want to read data from a Campbell CR1000 datalogger, and I found this topic (bottom link) is helpful and maybe the solution I want. But I cant read Spanish. Does anyone can help me in English version? Thank you and regards,
http://forums.ni.com/ni/board/message?board.id=6170&message.id=5278&query.id=357157#M5278
Hsien
Solved! Go to Solution.
05-16-2009 05:22 AM
Well, this is quite easy to figure out. If I understand the post correctly, this device supports OPC communication. Do you have an OPC server that you can talk to? You have two options:
1. Go with the LabVIEW DSC Module (add-on for LabVIEW). This is higher level and you can interactively develop a distributed monitoring and control system with tags ranging from a few dozen to tens of thousands. It includes tools for logging data to a networked historical database, real-time and historical trending, managing alarms and events, networking LabVIEW Real-Time targets and OPC devices into one complete system, and adding security to user interfaces.
2. Use Datasocket VIs which are provided in LabVIEW to communicate with the OPC server. This is really low-level and you will need to do some programming to establish communication between the server and LabVIEW.
Post back if you have any questions.
05-20-2009 12:30 PM
Dear Adnan,
Thank you for the reply.
I do not have an OPC server. My datalogger is connected to a Radio Frequency transducer (RF416 from CampBell) and wirelessly communicate with another RF transducer connecting to a PC. The RF transducer is connect to the PC via serial port. I wonder can I just write a visa read and write vi to communicate with the data logger? Do i have to have a OPC server to communicate to the datalogger? Thank you very much.
Hsien
05-21-2009 12:47 PM
As Adnan mentioned, the post was about OPC. Here is the translated response(from google translator )
Hey Mak,
An OPC Server is a server on a computer that enables communication
between a PLC and other specific programs on the computer. Each PLC
manufacturer usually develops an OPC server through which the records
are accessible to the PLC to other programs within this client
computer. The logger Campbell works similarly.
After installing the OPC server, data logger are communicated to
the PC. Now, how does that LabVIEW has access to that information?
There are two ways to do this.
1. The easiest way is through the LabVIEW DSC Module. It is a very
efficient tool for communication with OPC servers and many other
functionalities of SCADA systems. Annex two leagues Overview of LabVIEW
DSC. http://sine.ni.com/nips/cds/view/p/lang/en/nid/1010 and
http://www.ni.com/labview/labviewdsc/upgrade.htm
2. Through Datasockets. Does not require an extra module in LabVIEW but a bit more programming.
In the following link explains in greater detail how to communicate with an OPC server using LabVIEW in both scenarios.
http://digital.ni.com/public.nsf/allkb/9FAE59C3B902458B8625672400651A2E?OpenDocument
and
http://digital.ni.com/public.nsf/websearch/EA15F53DB6FECCA5862567240064DF09?OpenDocument
If you do not have LabVIEW DSC and not interested to buy, you
should do the communication using Datasockets. When installing LabVIEW
examples are installed using Datasockets with OPC servers. Find
Examples OPC search and there are some examples.
I personally got the OPC server address
http://www.campbellsci.com/2/20213/14/1 of Campbell, and aims to
communicate with LabVIEW.
I hope this information will be useful.
Greetings.
Pablo Bernal | NI Mexico
05-21-2009 12:58 PM
In addition, this is from the CR1000 user Manual:
PROTOCOLS SUPPORTED: PakBus, Modbus, DNP3
SERIAL INTERFACES: CS I/O port is used to interface
with Campbell Scientific peripherals; RS-232
DCE port is for battery-powered computer or non-
CSI modem connection.
BAUD RATES: Selectable from 300 bps to 115.2 kbps.
ASCII protocol is one start bit, one stop bit, eight
data bits, and no parity.
LabVIEW supports the Modbus protocol, either through the free(yet low level) Modbus Library and the High Level support provided by the previously mentioned LabVIEW DSC module.
You could communicate with VISA Serial, but you would have to know what you are doing and the communication, since you would be basically writing a driver. Maybe Campbell has more information on that?
05-26-2009 05:58 PM
Rob,
Does an academic full version LabView 8.6 include the DSC module? Our laboratory have a full academic LV8.6 version include 5 dvd disks: LV Core, LV Device Driver, LV Extended Development Suite, LV Signal processing and communications options,and LV Controls and Embedded Systems.
Thank you very much.
Hsien
05-27-2009 08:21 AM
Hsien,
Yes, the Controls and Embedded DVD has it on there, according to http://digital.ni.com/manuals.nsf/websearch/92F3BE9190B58D8E862574DE00660FBF
I would definitely try and use that to communicate with your instrument. Let us know if you run into any problems, and maybe we can help out.
05-28-2009 01:19 PM
Rob,
I have installed the DSC module and look into the manual. Couple principle questions still confuse me.
1. Does DSC itself be able to work as an OPC server? or just serve as an OPC client? This brings up my 2nd question...
2. For the Campbell CR1000 data logger, does it need an OPC server to communicate with DSC module, or can it work as an OPC client and send data to DSC via Modbus/ASCII protocols? We have installed Campbell's LoggerNet sofeware being able to communicate with the CR1000.
3. To be able to retrive data from the CR1000, does the data have to go through LoggerNet, then LV DSC collect the data from LoggerNet?
Tons of thanks you for the help.
Hsien
05-28-2009 08:36 PM
1. The DSC Module does not act as an OPC server but as an OPC client. You will need to have an OPC server to communicate with.
2. You will need to be specific about what protocol you want to use to communicate with. Using DSC, you can also do Modbus communication.
3. Not necessarily, you are just adding an extra layer that need not be there. If you are happy with Modbus communciation, then go ahead and setup a connection between DSC and the data logger directly.
06-04-2009 06:57 PM
Because my goal is just to retrive data from CR1000 datalogger, I figure out just set the CR1000 as a Modbus slave, with proper CRBasic syntex, then I can read the data from CR1000 by sending a hyperterminal commnd" \n\r7". The following link might be useful to anyone in the future.
http://www.campbellsci.com/forum/messages.cfm?threadid=A328967C-0398-DFE2-4AA0FB704E8F93BD
Thank you for all your help.
Hsien