Problema di polimorfismo con Read/Write delle Shared variable
Salve,
Cercando di modificare l'esempio di progetto "Shared Variable Client/Server" in un progetto dove sono i diversi client a mandare dati al Server ( ovvero l'esatto contrario di quello che fa )
mi sono inbattuto nel problema illustrato nelle due figure che seguono.
Ovvero, sostituendo "Writable PSP Variable" ad "Readable" nella scheda "Connect"(FIGURA 1) mi da un errore nella scheda "Read/Write" (FIGURA 2), ovviamente anche qui ho sostituito a "Read Variable" un "Write Variable".
Mentre utilizzando il Data Socket funziona, ma non mi sono chiari i vantaggi e gli svantaggi nell'utilizzare quest'approccio.
Qual'è la strada migliore tra Shared Variable e Data Socket per creare un sistema Client/Server così costituito, ovvero con un cospicuo numero di client da servire ( destinato a crescere )che mandano simultaneamente un discreto quantitativo di dati ( circa quelli di una seriale a 115200bps ) ad un server
FIGURA 1
IMMAGINE 2
Translation
Hi,
Trying
to modify the sample project "Shared Variable Client / Server" in a
project where different clients to send data to the server (ie the
exact opposite of what it does)
I untapped in the problem illustrated in the two figures that follow.
That
is, replacing "Writable PSP Variable" to "readable" in "Connect"
(Figure 1) gives me an error in "Read / Write" (FIGURE 2), and of
course here I replaced "Read Variable" a "Write Variable.
While using the Data Socket works, but I have clear advantages and disadvantages of using this approach.
What
is the best route between Shared Variable and Data Socket to create a
client / server system so constituted, or with a large number of
customers to serve (to grow) that simultaneously sends a fair amount of
data (approximately those of a serial to 115200bps) to a server
The images points to a gmail location. It is not properly attached.
Similar Messages
-
Problems reading from bound shared variable
I have a shared variable that is bound to another shared variable. When I go to read it's value in a VI by wiring the variable to the "value" property of a digital numeric object it displays zero. When i look at the two shared variable in the variable manager they show the correct values. Does anyone have a clue what's going on?
Welcome to the forums!
Let's narrow down the possibilities here. Try wiring the shared
variable directly to a front panel indicator rather than using a
property node. Second, the shared variable object includes an
error out terminal - this is where the variable engine can report any
errors in obtaining a value from the bound item. Wire the error
out to an error handler VI and re-run - you may find that the Shared
Variable Engine is reporting an error, which would be most helpful in
determining the problem.
If you could let me know the results of the above suggestions, I'll be glad to help further!
Cheers,
Matt Pollock
National Instruments -
URGENT DSC: I can write to shared variables but CANNOT read them?
hello everyone,
I'm using DSC to communicate with a DELTA DVP28SV PLC. I managed writing to a coil to to turn a fan on, and I also wrote to a register.
However, when i tried to read the coil (same coil i just turned on) or when i tried to read a register that im very sure has values (the register where i configure the modbus parameters), it would return ZERO, even when i tried to read the register that i just wrote into the reply was zero (I am sure that writing to the register was successful because i made the specific value that i wrote to the register a condition to turning a light on).
So, anyone knows why this could happen?? the Registers are Read/Write. I thought it could be that the scan time in the PLC is too short so i added delays but anything i read still gives zero back. ideas? can anyone help me with this?
here's the PLCs application manual in case it matters : http://www.delta.com.tw/product/em/control/plc/download/manual/DVP-PLC-Program_O_EN_20120416.pdf
Solved!
Go to Solution.here: capture.png shows the results i get
Attachments:
diagram.PNG 32 KB
Capture.PNG 10 KB -
Labview is reading zero from shared variable
Hello everyone
-I have a problem in labview shared variable cause it reads only zero value for all inputs and outputs and timers in S-1200 ...etc
but in NI OPC server using quick client it reads the correct value but when adding them in labview project they are not reading the correct value and only retruing zero
any suggestions
ThanksHi,
I recently finished the commisioning of the system I started to work upon. Hence the delay to come back to this thread.
During the commissioning of the system, I was concentrating on finalizing the system functionality and was using only the PC#1. Now when all the system functions were finalized, we duplicated the changes to PC#2 and started the operation.
What we observed when the PC#2 was started, was that if we were to open the same HMI page as in PC#1, the operation of the HMI was very sluggish. When we selected a different page for both PC#1 and PC#2, the HMI operation was good, all operations seemed to happen in real time!!
To give a background of the HMI, we have a subpanel to which the desired HMI page/screen is loaded. This loads a VI related to the HMI page.
Here, I am guessing that when I load the same page in both the PCs, the read/write operations to the shared variable(it is the same in both PC, and is deployed in a library on the cRIO) are some how hindered due both PCs trying to access the same network resource from different locations.
Is this guess correct? Any work arounds or solutions? Do I need to post any more information?
Thanks in advance,
Regards -
Dsc 8.2.1 cannot write to shared variables error 1950679035
I am getting error 1950679035 ni_tagger_write when I try to write to my shared variables. I recently upgraded from labview 8.2 to 8.2.1. I also upgraded to DSC 8.2.1. During the install, I had to upgrade my computer to SP2 (windows xp), which installed mdac 2.8 sp1 for use with dsc 8.2.1.
I have the windows firewall turned off, I checked with our IT dept and no upgrades were completed overnight (as the program worked yesterday using 8.2). I checked and MAX will get a connection with the fieldpoint unit. Everything is deployed from my machine, currently running under the dev environment.
I have looked at this thread, but I was not able to get anywhere, http://digital.ni.com/public.nsf/websearch/0D7B86F4B4D19A5E86256F9A006EECB1?OpenDocument and here.
Even though I have windows firewall turned off, I added all of the execptions to the windows firewall list.
It appears that the shared variable library is deploying correctly, as the the windows says that it has (when you run a vi). I am progmatically deploying the vi.
I looked at the variable manager and I attached a screenshot below. I am not sure if that means that it did not deploy correctly or not.?? (I was only watching a couple of the variables, I have about 20 total)
thanks
Kenny
Attachments:
variable manager.jpg 55 KBIt appears that my problem has been solved. Apparently our network had an internal error for a quick second and my nic did not like it. So after I restarted again (fourth of the morning) it started working now.
Kenny -
Problems with communication across a network using shared variables
I have two programs(projects) running on two different computers connected with a LAN. I am using LabVIEW 8.0, and the DSC-module. The program on one of the computers have measurements that I want to collect and show on the program running on the other computer on the network. I choose the indicator where I want to show the data, select ''Properties'', ''Data binding'', ''Shared Variable Engine (NI-PSP)'', ''Network Items'' and then browse for a Network...but the problem is that in my ''Network Neighborhood'' There is only one computer...and that is the one I am one...not the computer on my Network that I want to communicate with....
Have anyone any suggestions on how to solve this?
Kind regards MariMari,
Check this link regarding trouble shooting network-published shared variables:
http://digital.ni.com/public.nsf/websearch/6E37AC5435E44F9F862570D2005FEF25?OpenDocument
This might be a firewall issue, so I would check that first.
Frode -
Datasocket read stop but shared variable can update
Hello ,
I program with datasocket open/read, sometimes the read stops and after some time,maybe 10s, it go on reading, I compare this with shared variable (DSC) and found
the shared variable can update ,I don't know what happen to my program.
( the reason I'd like to use datasocket is that I need to change the ULR dynamically , I have many OPC tags to read ( 100 PLCs time 80 tags per PLC ) )
thanks for your help!
Solved!
Go to Solution.
Attachments:
shared variable VS datasocket.jpg 23 KB
shared variable VS datasocket.vi 17 KBHi~
The read function waits for items to be updated, and 10ms is the default time for this waiting. Setting wait for updated value to false will probably solve this issue.
PS: URLs of variables could be changed programmatically, see this document if you like.
Good day -
Read Write Calender Sharing with at least 1 other use
I've read several entries on the concept of publishing a calendar such that two people can both read and write to it. My situation is the same as numerous others, either a co-worker or a spouse trying to share a calendar where either party can edit events and have those edits reflected into the shared calendars on the others computers
What is the deal with this? Google calendars, Yahoo, etc all have this functionality. My wife and I are both mobile me users (unique user ID's in a family pack). We both use Apples, etc.
Giving the duplicity of entries, I think it would be in Apple's interest to publish a response on this topic. If the functionality is supported, then there should be a help file or application note on the topic. Same is true if a work around exists.
Anyone with any formula for how two people can share a common calendar that each other can edit and have those edits published to both parties calenders in iCal?
Thanks
MikeKMike,
Giving the duplicity of entries, I think it would be in Apple's interest to publish a response on this topic. If the functionality is supported, then there should be a help file or application note on the topic. Same is true if a work around exists.
Since Apple has not provided that native capability, and this is a user-to-user forum, you may want to try this third party solution: BusySync - Sync iCal and Google Calendar - from BusyMac
;~) -
Upgrade to 8.5.1 on all computers using shared variables?
Hello,
We are currently using DSC 8.5 and hosting the shared variable engine on one 'server' computer with other computers subscribing to network shared variables. Some of the computers are Windows XP and others are RT.
When we upgrade to DSC 8.5.1 can we just upgrade the 'server' computer and leave all other computers at 8.5 or do we need to upgrade all systems to 8.5.1 at the same time? Will computers running 8.5 be able to read/write network shared variables hosted on the DSC 8.5.1 system? Is such a progressive upgrade not advised? Thank you in advance.
- Chris White
ThinkG Consulting LLCHi Chris,
The variables pass through the Shared Variable Engine on your server before they are read by other subscribers. Therefore, you do not have to upgrade the DSC on all your subscribers. I hope that answers your question. For further reference on how network pulished shared variables operate as well as the role of the SVE, please refer to this link.
Ipshita C.
National Instruments
Applications Engineer -
Salve
Scusate se ho fatto qualche errore in questa chat ma è la prima volta che vi entro.
Ho un problema da risolvere con la fatturazione del mio abbonamento Cloud. Nelle fatture che mi inviano non c'è la mia partita iva e pertanto non posso scaricarle dalla mia azienda.
Come posso procedere affinche le fatture vengano inviate correttamente?Change Account https://forums.adobe.com/thread/1465499 may help
or
Adobe contact information - http://helpx.adobe.com/contact.html -
Javacomm read/write problem
Hello all, i have successfully installed javacomm package in my computer and i can enumerate all available ports. My problem is between the read - write communication. By running the SimpleRead first and then the SimpleWrite i got a "Port Already in use" which sounds normal to me, so i connected 2 pc's with a serial cable and runned one of sun's samples on each.
Step 1. SimpleRead waits for data on COM1
Step 2. SimpleWrite(on other pc) sends some data from COM1
Both COM1's are connected with that serial cable but seems no data coming. Am i doing something wrong? I tried same thing with VirtualPC but still no data arriving.
Any help appreciated. ThanksHello all, i have successfully installed javacomm
package in my computer and i can enumerate all
available ports. My problem is between the read -
write communication. By running the SimpleRead first
and then the SimpleWrite i got a "Port Already in
use" which sounds normal to me, so i connected 2 pc's
with a serial cable and runned one of sun's samplesAre you using a terminal the opens the port?
Without any ambiguity whatsoever,
"Port Already in use" means
something else has already opened the com port and I can say the
COMM API. works because I use it all the time with GPRS board.
ie:
https://hyperview.dev.java.net/source/browse/hyperview/www/comm/SerialHandler.java?rev=1.2&view=markup
Crossing pins 2 & 3 will only redirect your output/input
but will not cause the the port to be in use Jos.
(T) -
Can not read shared variable on cRIO, error -1950678968 nitaglv
Hardware setup:
Laptop
Laptop connected via USB to a frammer garber.
Laptop IP: 192.168.0.2
NI vision calculating a diameter and setting a network varaible
cRIO
cRIO connected to the laptop
cRIO IP: 192.168.0.1
Project has the shared variable in the cRIO library
NI vision writes to the variable on the cRIO. I can see the variable properly updating in system manager on the cRIO. I can also run a VI in my computer that shows the variable properly updating. But...... When I read the variable with a VI running on the cRIO, I get the folowing error and the variable never updates:
Error -1950678968 occurred at Shared Variable in Main.vi
Possible reason(s):
LabVIEW: Failed to load nitaglv, which is required for Network-Published Shared Variables.
This error or warning occurred while reading the following Shared Variable:
\\NI-cRIO-OASIS\cRIOVariableLib\BubbleDiameterFromVision
\\192.168.0.1\cRIOVariableLib\BubbleDiameterFromVision
(I do not get any errors at deloyment)
So everything (NI Vision, a VI deployed on the laptop, NI Distributed System Manager) can see the variable on the cRIO being updated by the NI Vision.... Except for a VI running on the cRIO.
I have verified that I have Network Variable Engine and Variable Client Support for RT installed on the cRIO. I have tried reinstalling all s/w on the cRIO. Tried rebooting all. And talked in a nice, positive, reassuring voice to the chassis.Hi!
I just had the same issue with my cRIO 9073 using NI RIO 3.6.0.
The problem is not caused by a corrupted project, but the improper installation of the OS on the target. There is nothing you can do using the SW installation wizard in MAX, as it does not matter if you intall a full RIO SW, minimal or custom.
You have to install the full install or a custom one with Shared Variable support. Then you have to FTP to the cRIO, and manually edit the "ni-rt.ini" file located in the root of the controller.
Make sure you have a line in the "[MODULE VERSIONS]" section which shows the version of the nitaglv.out file. (The problem is caused because this dll is not loaded when you try to access a SV) Mine looks like nitaglv.out=6.3
Then you have to insert "nitaglv.out;" without quotes to the [LVRT] section's StartupDLLs key's value. I did it after the taggerrt.out name. So my key entry now looks like this:
[LVRT]
StartupDLLs=nisysapirpc.out;NiViSrvr.out;NiRioRpc.out;taggerrt.out;nitaglv.out;sysstatepublisher.out;
memoryChecking=False
LABVIEWRTDir=/c/ni-rt/system
PATH=/c/ni-rt/system/;/c/ni-rt/;
CDIntervalTicks=55
WebServer.Enabled=FALSE
RTTarget.VIPath=/c/ni-rt/startup
RTTarget.IPAccess=+*
RTEnetRcvMode=2
RTCPULoadMonitoringEnabled=True
RTTarget.ApplicationPath=/c/ni-rt/startup/startup.rtexe
server.tcp.access="+*"
RTTarget.LaunchAppAtBoot=True
RTTarget.EnableFileSharing=True
server.tcp.serviceName="Main Application Instance/VI Server"
After you are done with the editing, you have to save the file, and overwrite the original one. You have to reboot the controller for the modification to take effect.
After this you will be able to host your variables on the cRIO and also read/write them from the application running on that same target.
I hope this will help for you too.
Regards,
Peter -
Weird delay reading shared variables
Hello,
I'm working on a project were I'm monitoring some prodution lines. I'm using DSC module's OPC server to connect to PLCs on the production line and I've created bound variables on my labview project of the PLC's tags.
On my project I have one main VI were I show information about the production lines and were I can access several subVIs were I show other information about those lines. Then I have a VI that is running in background were I'm reading about 50 shared variables from the PLC and where I'm registering some data in a MySQL database, datalogging data on the Citadel database and registering alarms.
The problem I'm having is that on the VI that runs in background I noticed a delay reading the variables that are reading containers weights from the production line. It seems that all the other shared variables don't suffer any delay, only the weight variables start having some delay when the values are increasing. It also seems like that, when I'm only running that VI alone, without running the main VI, there isn't any kind of delay. I'm reading the shared variables as shared variable nodes.
Can anybody help me understand what's happening and how can I fix this delay? The VI that runs in background is time critical and a weird delay like that messes up my data.
Solved!
Go to Solution.Hi Mateus23,
The shared variable has various buffering capabilites, including integration with the Real-Time FIFO feature in LabVIEW Real-Time.
I guess that the buffering settings are causing the unexpected behavior.
Check these resources:
Buffered Network-Published Shared Variables (whitepaper)
Shared Variables Properties Dialog
- Network Page
- Real-Time FIFO Page
~~ -
Can I read/write global variables that are in other PC?
I attach the vis and the executables.
My problem is that when I run( continuosly, because in other way, I read the default value of the variable) getvalue.vi and setvalue.vi, I don´t have any problem, I can read/write the global variables, the two vis is running in the same PC.
But when I do the exe and I run them continuosly , it doesn´t work.
Any solution?
Thanks in advanced!
Graci
Attachments:
Get_Value.vi 30 KB
Set_Value.vi 30 KB
Exe.zip 272 KBHello Bichillo,
By running the vis continuously you are running into race conditions. If you cannot control when you are writing to or reading from a global variable, you cannot know whether the value writen/read is the right one or not.
In your case the global variable value that is read is sometimes the last value writen and sometimes an empty string.
To make the global variable behave as desired, that is, keeping its last value, the global variable must be in memory when you access it using VI Server. If it is not in memory, the returned value is an empty string. That´s why you sometimes get a non-empty string: when you access the global variable to read its value, it happens to be in memory because you´ve just writen to it.
To ensure that the global
variable is always in memory and it keeps its last value, you must include the global variable into your block diagram. I am attaching modified vis that implement this.
Hope it helps.
César Verdejo
Training and Certification | National Instruments
Attachments:
Get-_Set_Value.llb 48 KB -
Read LabVIEW shared variables ( network variables?) with VB6
Hi, i need to read some LabVIEW shared variables (network variables?) using a VB6 program.
Is it possible?
I think that yes, using Measurement Studio for VB6 but I don't know how and I haven't found information in the Measurement Studio for VB6 help file
Could some one send me a program example or explain me how it is possible to read LabVIEW shared variables fromVB6?Hello quintella,
To be able to interface with LabVIEW
Shared Variables with Visual Basic 6 you will need to use NI Measurement
Studio, which ships with examples on how to use VB6 with DataSocketing. Apart
from Data Sockets, if you are using Measurement Studio 8.1 or higer, with the
Network Variable Library introducted in NI Measurement Studio 8.1, you can read
and write to shared variables in ANSI C, Visual Basic .NET or Visual C#. (http://zone.ni.com/devzone/cda/tut/p/id/4679)
Here you have two links where you can
find more information about how to use the datasocket option. In addition, there
are several examples included in Measurement Studio with Network Variables and
Datasocket.
http://forums.ni.com/ni/board/message?board.id=230&message.id=2945&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=230&message.id=3324&requireLogin=False
Regards,
Maybe you are looking for
-
How do I use mobile link to view documents on more than one device?
I have documents on my iPhone and want to send them to my iPad using Mobile Link. How do I do this?
-
Article Purchasing tax P8 calculation schema
Please help with following situation: 1 Purchasing Org for several Comp Codes Purchasing Org is not assigned to any of them Purchasing Info Records are created at Purchasing Org level When tax code P8 is entered for VAT, system issues following error
-
ABAP report from fields connecting to an external database
Hi All, The requirement is to connect some GL data with external audit data which is stored in an oracle database. These two table data has to be merged and a report has to be generated. I heard we could connect to the external database from the R/3
-
Macbook Pro won't sleep properly.
Hello; I have a problem with my mid 2009 13'' MacBook Pro that won't sleep properly. Whenever I close the lid, or chose ->Sleep, it takes a few seconds and the system sleeps (fan off, led fading off) , but INMEDIATELY after just a few miliseconds, t
-
1) OS version: OS Name : Windows Server 2008 R2 2) BO version: BusinessObjects XI 3.1 SP05. 3) My question: We have "dbbackup.exe" utility in SqlAnywhere in BI 4.1 for running the transaction log ( CMS and Audit) truncation/backup. But the sa