Thursday, August 25, 2011

SCCT - Tutorial for LabVIEW (STEP 3)

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 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.

SCCT - Tutorial for LabVIEW (STEP 2)

we go ahead with SCCT tutorial. We want to improve our client interface: we remove 2D array and present our analog data with three different indicators. we would like to change our indicator's captions according to their related channel's name and use some system configuration details to customize slide scales.
Here are diagram and panel:

Notice that configuration is retrieved with It returns the same configuration cluster we created into our
by default slide's caption are "Slide 1", "Slide 2" and "Slide 3", when we run, SCCT retrieves by itself system configuration and returns it to our application. Slide scales are changed according to our configuration.

with a small effort we learned how to take advantage of SCCT features to create a monitor application which uses our remote system configuration.

Please write us at to get LabVIEW projects used in this tutorial.

SCCT - Tutorial for LabVIEW (STEP 1)

Today we introduce SCCT for LabVIEW. you can get your evaluation copy at

With this step by step tutorial we are going to see how to add SCCT features to an existing app.
We use a simple PID app created to control a pressure into a pipe.

Basic application is composed by only one VI, shown below:

VI panel is shown here:

We don't care for the moment about control theory, so we don't spend words on PID tuning, but we focus on SCCT library.

Now we want to monitor our application from remote locations, with a notebook, a tablet or a smart phone.
every platform requires a simple monitor application created with a specific programming language. For instance, if you want to monitor your app from a mobile with Android, you have to create a simple program in Java using SCCT for Java. Now we want to monitor our app from a PC so we are going to use SCCT for LabVIEW both for server side and client side.
Let's start from server side.
We want to publish PID output as well as PID target and process variable.
Take a look to the following diagram:

We added 3 VIs:
StartPublisher which starts publishing service as a background task into your application. it's a separated VI that takes care of sending and receiving data on the specified port.
PublishData which makes your data available to subscribers. notice that data must be organized into a 2D array where every row contains samples from a specific channel.
StopPublisher which closes background task and clears memory.
That's all!!
it's very simple, isn't it?

If you deploy this application, it handles multiple connections at the time with different devices, platforms and applications created in Java, VB, LabVIEW, ANSI C, and More.

Notice that we have described our system to incoming subscribers with a cluster which contains some details regarding our analog channels. this info are used by clients to properly present your data.

Now we take a look to the subscriber we want to create:
below you see its panel and diagram:

Notice that we use the same port for both server and client and the same API-Key "tutorial".
client diagram contains 4 SCCT VIs only:
openConnection which start a background task to handle incoming data.
transferStatus which says to the server "please you can start push data for me"
getAnalogData which returns analogData whenever ther are fresh data
closeCommunication which close background task and clears memory.

So in five minutes we added communication capabilities to an existing application.

I hope you enjoyed this tutorial.