Thursday, August 25, 2011

SCCT - Tutorial for LabVIEW (STEP 3)

Hi,
we see now other interesting SCCT features. We would like to change PID parameters from our client applications. First of all take a look to client Panel and diagram:

we added a cluster to edit PID parameters and an UPDATE button.

We added a while loop to handle user events. We created only one event called "apply". When user presses "UPDATE" button, a request in sent to server with sendRequest.vi. Every request is composed by a numeric code and a text. PID parameters are formatted into a string and then we assign code=1 to this request.

Notice that with can pass SCCT observe's wire to different loops. you can easily manage SCCT objects passing them to your subVIs.

Now we modify server to handle client's requests.Here is its diagram:


We added a while loop dedicated to manage user requests, connected to SCCT publisher object, which simply waits user requests and, according to their codes, executes different functions. In our example there is only a code (=1) used to update PID parameters. Server must know the meaning of every request's code and in this example, has to know also how to read text messages. You can create your own format to exchange data throw messages and requests.

In 3 minutes we have added a very nice feature to this application: now it can publish data and let remote connections to change PID parameters.

Please contact us to get this LabVIEW project.

No comments:

Post a Comment