LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos
Message 1 of 5
(3,042 Views)

 


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.

0 Kudos
Message 2 of 5
(3,033 Views)

Ciao Erter,

potresti riallegare le immagini?

 

MarcoMar

National Instruments Italy
0 Kudos
Message 3 of 5
(3,013 Views)

Fatto. 

Grazie per l'attenzione. 

Download All
0 Kudos
Message 4 of 5
(3,006 Views)

Ciao erter,

 

l'errore che riscontri nel VI Variable Refnum API Client è dovuto al fatto che Waveform Connection e Clientlist Connection contengono due tipi di dati differenti: di conseguenza le reference create dal To More Specific Class non sono entrambe adatte per la scrittura delle Shared Variable.

 

Ti consiglio di leggere la parte finale di questo documento per comprendere alcune differenze tra DSC e Shared Variable.

 

Personalmente di consiglio di scegliere la soluzione con DSC, specialmente se il numero di Shared dovesse aumentare significamente  in futuro: in questo modo dovresti evitare numerose complicazioni, anche relative alle prestazione complessive del tuo programma.

 

Ciao!

______________________
Simone S.
Academic Field Engineer - Med Region
0 Kudos
Message 5 of 5
(2,985 Views)