sasi_hk Posted December 30, 2010 Report Share Posted December 30, 2010 Hi all, I am new to LabVIEW and to this forum as well. I am currently trying to build an HMI using LabVIEW that will monitor and control an AB Micrologix 1000 PLC. This is my Uni project and I am getting late and anxious. I started out a few weeks earlier and everything was pretty good: I have got LabVIEW 2010, DSC 2010 and NI OPC Server. I hooked up the Micrologix 1000 to my PC using serial port COM2 and did some simple programming with RsLogix Micro Lite. Then I got NI OPC server up and running and configured all inputs and a few bits as tags. I can see value changes in the inputs with the OPC Tester. Then with LabVIEW 2010, I opened a new project, opened a new IO Server and a library. In the library I created bound variables that are bound to the NI OPC tags and deployed them. From there on, I made a VI which acted as an HMI, basically displaying the input status of the PLC and some of the bits. I even got to energise the outputs via some bits. Then about a week ago everything started to go funny. Instead of using shared variables in the block diagram, I decided to use panel binding. But when I ran the VI, everything slowed down, the processor hit the ceiling, VI got unresponsive, wont even close. Its been downhill since then. I have gotten rid of the panel binding. Removed unnecessary and unused libraries. But still, the PLC status is not updated or updated in 5 or 10 minutes. Opened up a new project and started with the simplest of things again. Yesterday, repaired LabVIEW and reinstalled DSC. I have tried everything I can think of but still unsuccessfull. This evening, I tried again. I removed some OPC tags that were for bits with read/write access. Then started with a new project again. Created a new IO server and created a few bound variables. Made a VI with a LED connected directly to the shared variable. When I tested it everything works good. when I toggle the input to the plc , the LED connected to the inputs shared variable, toggles as well. Then I added a new tag in OPC server for a bit we could write to and created a bound variable for it. Then in the VI used a boolean button to directly write to the shared variable. Now, when I ran it, nothing would happen. The same variable that were updated just a few minutes ago doesn't respond or update at all. Most of the time the error is :LabVIEW: (Hex 0x8BBB0005) Unable to locate variable in the Shared Variable Engine. Deployment of this variable may have failed. Sometimes the error is that a certain shared variable could not be written in to. How can this happen? Has anyone had this frustration before? Some possible things I can think of: I have since made some changes in the PLC code which caused some tags to be added/removed from the OPC Server. And I have played around the address display format in the PLC code. Will this affect the OPC server? It seems that the Shared Variable Engine is having problems deploying and publishing variables. I had a mixture of example. tutorial and incomplete libraries. Does this affect the DSC? Why is it that, when i start a new project with a few variable for PLC inputs, it works. But as soon I add a variable to write to a bit in the PLC, everything goes belly up? Anyone with suggestions and explanatory materials or tutorials, please help me. Its really frustrating. Thank you guys. Quote Link to comment
tushar Posted February 4, 2011 Report Share Posted February 4, 2011 can you share your code or may be screen shots Quote Link to comment
sasi_hk Posted February 7, 2011 Author Report Share Posted February 7, 2011 can you share your code or may be screen shots Hi Tushar, thankx. After all the frustration, I dumped everything and started afresh. The steps were the same but everything is working fine now. My project is almost ready. I think all the problems were caused by incorrectly defining tags, deleting tags for bound variables but still deploying the variables and the likes. The SVE does actually shut down sometimes. Anyway, I am good now. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.