Leveraging SCADA tools for PIC Monitoring.

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jay_dee
Posts: 229
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 92 times
Been thanked: 58 times

Leveraging SCADA tools for PIC Monitoring.

Post by jay_dee »

Hi,
SCADA... I'v been playing and its a really interesting option, I think I need a realistic project to really get to grips with it.
As I understand; With SCADA the control logic is held at the PC and its the PC that runs the projects flowcode logic, the remote microcontroller just implements individual comands but has none of the project specific logic on board.

For many of my projects what would be really useful is a quick reliable interface for the end user, could the SCADA tools be leveraged of this?
For example a ECIO ( or similar) runs as standard, directly delaing with all aspects of the projects control but...

A) Could something be setup to periodically send values back to a PC running SCADA ?
B) Could it send alphaneumeric strings?
C) Could it recieve commands and values from the user ?
D) Does it have to run over USB or could this be made to work over a simple UART (slower yes but then tiny PICs could also join the party)

Thanks, J.

jay_dee
Posts: 229
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 92 times
Been thanked: 58 times

Re: Leveraging SCADA tools for PIC Monitoring.

Post by jay_dee »

to explain the sending of strings..
If I wanted a fairly generic SCADA monitoring program that could work across several PIC projects, I was thinking I might initially send from the PIC a sequence of strings , these would need to be the names of each value1, value2, value3 etc...
The recieving SCADA flowcode could identify these and update a text box of something.

I could then just periodically send each values updated numerical value, keeping the exchange of data down to a sensible rate.
just thinking a little out of the box. :)
J.

BenR
Matrix Staff
Posts: 1952
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 510 times
Been thanked: 698 times

Re: Leveraging SCADA tools for PIC Monitoring.

Post by BenR »

Hello,
For many of my projects what would be really useful is a quick reliable interface for the end user, could the SCADA tools be leveraged of this?
Yes the SCADA / App Developer project can be exported and bundled with the runtime and this can be provided to a customer for them to run without any need for installation or licensing at their end.
A) Could something be setup to periodically send values back to a PC running SCADA ?
Yes
B) Could it send alphaneumeric strings?
Yes, anything you want really
C) Could it recieve commands and values from the user ?
Yes if you want it to, we have a few examples on the WIKi showing how to do this.
https://www.flowcode.co.uk/wiki/index.p ... DA_Slaves)
D) Does it have to run over USB or could this be made to work over a simple UART (slower yes but then tiny PICs could also join the party)
Yes it will work fine through a UART though would likely need something like a UART to USB converter such as the FTDI IC to get the data into the PC. Bluetooth or Ethernet of WIFI could also be used as well as many other options.

If you were using a UART then you could easily output data or messages to the UART periodically in your program. The App Developer program can pick up these messages, parse them and display using the appropriate panel component or simply via the console window.

You can also send out data from App Developer and catch this in your application to do specific things such as run a test or switch something on or off. You could even use it to do things in the factory like program NVM or EEPROM or perform a test routine.

Hope this helps and please let us know if you need more info. We are keen to show off what we can do with this software and so real life applications are very handy to get the message out.

The PC software section of this page shows an image of our exported app for electrical machines.
https://www.matrixtsl.com/electrical-machines/

You can download the files here if you want to see the files for yourself.
http://www.matrixtsl.com/resources/file ... DAv1.1.zip

jay_dee
Posts: 229
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 92 times
Been thanked: 58 times

Re: Leveraging SCADA tools for PIC Monitoring.

Post by jay_dee »

Thanks Ben, I'll have a play. J.

jay_dee
Posts: 229
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 92 times
Been thanked: 58 times

Re: Leveraging SCADA tools for PIC Monitoring.

Post by jay_dee »

Hi,
I downloaded the machines examples. those gave really good examples of what can be achieved as a front end. They are in a compiled format so I can see the result but not how they are achieved? Is there a sample of the source .fcsx file?
J.

jay_dee
Posts: 229
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 92 times
Been thanked: 58 times

Re: Leveraging SCADA tools for PIC Monitoring.

Post by jay_dee »

Hi,
With SCADA, several devices have a API for slave mode, these facilitate a fixed command and responce method.

For the ECIO40P I think the commands
": 0x80 0x01 0x01 ;n " would set output channel 1 (A1) to logic 1.
": 0x81 0x06 ;n" requests the digital state of input channel 6 (B0) , The Input is read and returned as a single byte sent using USB slave.

Since no input identifier is sent with the single return byte, This implys that the PCs SCADA system knows/remembers what information was requested and thus accepts the next return byte as the value of that parameter.

So for just monitoring an embedded microcontroller, rather than using it as a SCADA Slave. I'm thinking I would need to determine a method of passing back first an identifier, followed by a value.
I may have this all wrong. :)

Is there a more generic SCADA data exchange mode? Do I use data injectors?
Using FAD I gusess I would then just do some sort of circular buffer, parse incomng bytes and apply the relavent Values to each indicator.

This requires a higher data overhead but I'm not looking at directly running a control program though SCADA so speed is not as critical.

Is this the right sort of approach?
Thanks, J.

BenR
Matrix Staff
Posts: 1952
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 510 times
Been thanked: 698 times

Re: Leveraging SCADA tools for PIC Monitoring.

Post by BenR »

Hello

At the moment our components do a question and answer type control and so if you wanted the embedded devices to be able to drop data whenever then wanted you could reverse things and have the embedded device sent the question and flowcode do the answer. Or just send data whenerer with an identifier and have app dev polling and parsing the data.

App developer has a xml and json parsing component so a really straightforward way might be to send data formatted as this. Then you can pass all sorts of things in and easily parse through it.

Post Reply