polling variables using Modbus IP and labview 8.2.0 sharedvariables

This is a discussion on polling variables using Modbus IP and labview 8.2.0 sharedvariables within the labview forums in Programming Languages category; I'm using shared variable in order to read/write register on a Watlow PM controller over Modbus IP standard. Once I make a change to FP control, the shared variable polling starts and I no longer get update of any controls or indicators on the FP.   Just wondering if this is an LV 8.2.0 issue and if any of this is addressed in LV 8.5?   Thx ahead of time richjoh...

Go Back   Application Development Forum > Programming Languages > labview

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 12-28-2007, 12:10 PM
richjoh
Guest
 
Default polling variables using Modbus IP and labview 8.2.0 sharedvariables

I'm using shared variable in order to read/write register on a Watlow PM controller over Modbus IP standard. Once I make a change to FP control, the shared variable polling starts and I no longer get update of any controls or indicators on the FP.
 
Just wondering if this is an LV 8.2.0 issue and if any of this is addressed in LV 8.5?
 
Thx ahead of time
richjoh
Reply With Quote
  #2  
Old 12-31-2007, 02:40 PM
Kevin_H
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

Hey richjoh,
 
Thank you for contacting National Instruments.  I need to get a little more information about your modbus setup.  Are you using the DSC module within LabVIEW, or are you using the Modbus VI's?
 
Also, are you connecting to any sort of Modbus server?
 
I look forward to hearing back from you.
 
Regards,
 
Kevin H
Reply With Quote
  #3  
Old 01-02-2008, 09:10 AM
richjoh
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

Kevin thanks for the response, I'm using DSC module within Labview. I'm using my PC and a Watlow PM controller thats it. (I guess the PC is the server). I don't have any code yet, just a library of Modbus shared variables (SV). I slide a few SV controls on the FP to observe and run a loop with a stop button that it.
 
Richjoh
Reply With Quote
  #4  
Old 01-02-2008, 05:10 PM
richjoh
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

Kevin, there is a problem with the UpdateNow shared variable. It always shows X in the Variable Manager window. This is just a write only control and I have no idea why an X is shown while the others, i.e. "Updating, OffHook, Commfail and UpdateRate" appear OK.
Richjoh
Reply With Quote
  #5  
Old 01-02-2008, 05:10 PM
richjoh
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

pic is attached below


modbus UpdateNow.PNG:
http://forums.ni.com/attachments/ni/170/292679/1/modbus UpdateNow.PNG
Reply With Quote
  #6  
Old 01-04-2008, 09:10 AM
Jennifer_R
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

Hi richjoh,
 
If I understand correctly, there are two issues to address: the status of the UpdateNow shared variable and the fact that your controls and indicators are not updating. 
 
When you right-click on UpdateNow in your project and select Properties, what is the data type listed there?  Is it bound to one of the other shared variables that has a value in Variable Manager?
 
After changing a control on the front panel, do you continue to see the values changing in Variable Manager even though the controls and indicators do not update on the front panel?  Do you see the same behavior regardless of which control you change? 
 
Thanks for the additional information. 
Reply With Quote
  #7  
Old 01-04-2008, 11:40 AM
richjoh
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

Hi Jennifer_R. The data type for Updatenow is Boolean. All my Shared Variable are bound to one and only one Variable.
 
I tried to perform your observation regarding changing controls. I get an update after changing the control, but I was only able to see this after increasing the UpdateRate SV to something faster than 1. In the attached pic UpdateRate is set to 0.3. I get sporatic updates. Its as if I  have a syncronization problem over the Modbus tcp/ip. At this UpdateRate I get values read from registers but there are frequent Commfails. The PC and Watlow PM controller are connected through a 10Mbps Hub, both devices have a fixed address. Any ideas why I'm getting Commfails???
 
regards,
Richjoh
Reply With Quote
  #8  
Old 01-04-2008, 12:40 PM
richjoh
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

Also, any SV dragged to my block diagram result in an error message whenever I run the VI. Error -1950679038 occurred at ni_tagger_lv_Read, see the attached.


modbus blck dia SV error.PNG:
http://forums.ni.com/attachments/ni/170/293041/1/modbus blck dia SV error.PNG
Reply With Quote
  #9  
Old 01-05-2008, 12:40 PM
Jennifer_R
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

Hi richjoh,
I noticed there is now a Device Status shared variable.  Has that provided any insight as to why you may be receiving a device error?  A good first step when receiving error -1950679038 is to check your hardware configuration.  
I'm not sure about the Commfails.  Do you have any waits in the loop you are running?  Also, do you have multiple network cards on your computer?  If so, it may help to disable any that are not being used. 
Reply With Quote
  #10  
Old 01-07-2008, 08:10 PM
richjoh
Guest
 
Default Re: polling variables using Modbus IP and labview 8.2.0 sharedvariables

Jennifer,
 
I create new modbus servers, a master (the Watlow controller) and a slave server. I see the values are updated for the master, looking at this through the SV manager.
 
My problem is whenever I run a vi with a SV control or indicator I do not get update. What need to be done here to ensure I update controls. Apparently the modbus is working from the attached pic of the SV manager...
 
richjoh


SV manager1.PNG:
http://forums.ni.com/attachments/ni/170/293447/1/SV manager1.PNG
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:42 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.