By Ram Prakash
Can anyone please tell what a DVR [ Data value reference ] is ? I want to know at what situation it will be used and what are the advantages we get by using DVR. I am really confused in this topic . If someone has any code in which they have worked with DVRs. kindly share it to me.
Modbus Communication with a PLC Siemens SIMATIC ET 200SP
Windows 7 Ultimate
When I run my code it return error 66 at Read Holding Registers function. I ran this code as a VI on the development virtual machine and as a *.exe on real machine, but received the same error.
Try in another computer and receive the same error.
As PLC code was developer by other programmer I ask him if this communication was working on his machine, he showed me a LAbVIEW code running with Modbus communication with the same PLC. He was using a LabVIEW 2013 with old Modbus Library, but I had taken his code and ran on my PC with LV 2016 and receive the same error on MB Ethernet MAster Query Read Holding Registers(Poly).vi. Also generate an exe file and run on my real machine and still receiving error 66.
In all scenarios I can ping PLC and receive answers, but cannot read or write any data with LabVIEW.
First picture is my code with LV 2016 VIs.
Second picture is error message.
Third one is the other programmer code with old Modbus Library.
On the first code, if I remove Read Holding Registers VI and connct wires directly or put a property node to set any property it runs without errors. If change this function for any other modbus function return error 66.
Any idea what I am doing wrong?
Thanks in advance!
By Gan Uesli Starling
I am assigned to refurbish an airflow instrument having six pressure sensors, four temp sensors, and six on/off outputs. By preference I would use all NI hardware, but this isn't going to be allowed. I'm being pushed toward installing an Allen Bradley PLC instead. I am aware of another, much more complicated liquid flow test stand which, so I'm informed, uses LabVIEW for SCADA on a Seimens PLC. This being the case, cannot I do likewise with Allen Bradley? Can I do it entirely in LabVIEW? Or is something like that always just LabVIEW sending trigger commands and receiving data from a free-standing program written in the PLC's own native SCADA?
I'll be starting from scratch, with nothing yet purchased. I can purchase whatever I choose. I have perused a couple of PDFs of Allen Bradley ControlLogix programs, and at first glance, to me they look like a major pain. Unlike LabVIEW, almost nothing shows on any one screen. Nothing at all looked to have been nested into a subroutine. I liked ladder and highway diagrams quite well enough back in the 90's when printed out on D-size vellum. Then, at least, I could stand back and see the whole thing. The same thing seen only through a tiny window that you have to scroll up and down I'm not looking forward to learning at all. Thus my hope for a LabVIEW solution, rather than purchase and learn AB's Studio 5000. I'm an old dog, and this looks like a new trick to me.
Thought I'd pass this along and see if anyone can reproduce with different versions of LabVIEW. Appreciate it if anyone has seen this and has a fix.
I'm using shared variables to communicate between applications (1:N). I'd been seeing some memory creep that was inconsistent and somewhat bizarre. Eventually managed to track it down to that I'm programmatically opening a connection to a shared variable in one loop, then reading the value in a different loop (the different loops have to do with reconnecting on connection loss and startup). There is a functional global used to pass the variable to the second loop. The Read Variable primitive deallocates all but 4 bytes of memory for the previous loop handle and then allocates memory for a new handle on each iteration of the while loop, hence creating a leak. This behavior does not occur if there is only one loop where there is an open, while loop with a read, and a close.
Main.vi demonstrates the issue. Main 2.vi is more like the NI example.
I've got service request #7728859 with NI going, but I think I got the guy's first day.
LabVIEW 2015 SP1 32-bit on Win7 64-bit. Shared Variables memory leak.zip
I recently was presented with the task of integrating a Mitsubishi PLC into our systems. After a good deal of googling, I think the best (maybe only) way to get the data out is going to be via OPC, thanks to their proprietary Melsoft protocol. If anyone else knows a better way, feel free to stop me here.
Now, we are currently expanding our data generating capabilities (hence the PLC), and I have been thinking about rearchitecting the way we collect data from all over our facility to be more flexible. Since I may be required to use OPC anyways, I was considering using an OPC server to aggregate all of the facility data, and then redistribute to control rooms, historical logging, etc. To do this, we would need to integrate our cRIOs and operator PCs into the OPC environment as well.
I don’t see OPC mentioned very often (in fact it returns 0 results on LAVAG), and a lot of the stuff I see these days seems to be more “roll your own” or lower level (raw TCP/UDP, 0MQ, Network Streams, Transport.lvlib etc.) rather than a monolithic abstracting bridge like OPC. Unfortunately, I won’t have time to roll my own in the near future, but LVRT supports supports OPC UA, so I could potentially integrate the cRIOs fairly easily. Unfortunately, I think I would have to use LabVIEW DSC (or datasockets...) to integrate the PCs.
I would be very grateful if anyone has the experience to comment on the following or anything else related to using OPC.
What are viable update rates for OPC tags? I will need at the very (very) least 250 ms update rates. Is OPC typically low latency (time from data generated to to client received)? Does anyone have a recommendation for a product (NI OPC, Kepware, etc.)? Is OPC still popular, or are there other options for data aggregation that would be better suited to a new application? What are the options for logging and alarming with OPC? What are the options for talking to OPC from LabVIEW? How robust are the OPC connections in regards to reconnecting if a wireless connection is temporarily lost? Thanks in advance!