Using Script to Drive Software Operation

  • Thread starter Thread starter Charles Law
  • Start date Start date
C

Charles Law

This is a bit of a vague question, but I am just starting on this, and
wonder if anyone has ideas of where to start.

I have a program that controls some external equipment. It sends messages in
various flavours to cause the equipment to turn signals on and off, and
change voltages and such like.

Attached to this external equipment, is another piece of equipment that
responds to these changes in signals and voltages.

What I need to do is automate the way in which my program turns these
signals on and off, and changes voltages in the external equipment. I also
need to do it in such a way that it is configurable without changes to
source code.

My first thoughts are towards some kind of script that I interpret and use
to determine what actions my program must take. The script would need to be
flexible enough to allow me to specify what signals are controlled, in real
time, and what voltages are set and over what time period they should
change. It would also need to allow me to monitor status from the external
equipment in a given time frame to determine if actions had been successful
or not.

That is as far as I have got. Is this type of application familiar to
anyone, and does anyone have any suggestions regarding how to go about this?
Some examples of scripts that make this type of operation possible?

As I say, it is a bit vague at this stage, and this is probably not the very
best place to be asking, so if anyone knows where I would be better asking
that would be helpful too. Otherwise, any pointers welcome.

TIA

Charles
 
..Net is good but that doesn't mean you use it for everything. Consult your
equipment supplier they maybe able to advice you what programming languages
will take advantages of their equipment.

chanmm
 
It is too vaugue, you need to have a more defined requirement.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
Hi

The equipment is produced by the company I am working with, and is bespoke,
so there are no tools already for this particular job. That is what they
want me to do.

Charles
 
Hi Terry

It is more the general technique I am after, rather than specifics.

I don't think I can easily be less vague, although I can provide further
details and answer specific questions if it helps.

The requirement, if you like, is to automate control of the external
equipment in a runtime configurable way. I already have a set of classes
that can be used to control the equipment. Now, I am looking for an elegant
way to automate that control from [perhaps] a script file, probably using
xml.

The sticky part is translating something I de-serialize from the file into a
series of 'instructions' that my classes can understand as commands for the
external equipment, including timing and scheduling.

I just occurs to me that perhaps what I am after is a pattern. A suitable
pattern for this scenario might set me on the right road.

Charles
 
Well, the Command pattern could work for something like this.

I would question if .NET is the environment that you want, however. You
are speaking of real-time control. I am not sure that .NET is a good
choice for a RTOS (Real-Time Operating System).

HTH

David

Charles Law said:
Hi Terry

It is more the general technique I am after, rather than specifics.

I don't think I can easily be less vague, although I can provide further
details and answer specific questions if it helps.

The requirement, if you like, is to automate control of the external
equipment in a runtime configurable way. I already have a set of classes
that can be used to control the equipment. Now, I am looking for an
elegant
way to automate that control from [perhaps] a script file, probably
using
xml.

The sticky part is translating something I de-serialize from the file into
a
series of 'instructions' that my classes can understand as commands for
the
external equipment, including timing and scheduling.

I just occurs to me that perhaps what I am after is a pattern. A
suitable
pattern for this scenario might set me on the right road.

Charles


"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message
It is too vaugue, you need to have a more defined requirement.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

messages
 
Hi David

I will look up the Command pattern. Thanks.

I am not too worried about .NETs real-time credentials at the moment, as the
critical thing about the timing is in fact sequence. Times will be in
numbers of seconds for actions to complete, so I will experiment with
raising the priority of worker threads if I need to. However, I take your
point on board.

Charles


David Williams said:
Well, the Command pattern could work for something like this.

I would question if .NET is the environment that you want, however. You
are speaking of real-time control. I am not sure that .NET is a good
choice for a RTOS (Real-Time Operating System).

HTH

David

Charles Law said:
Hi Terry

It is more the general technique I am after, rather than specifics.

I don't think I can easily be less vague, although I can provide further
details and answer specific questions if it helps.

The requirement, if you like, is to automate control of the external
equipment in a runtime configurable way. I already have a set of classes
that can be used to control the equipment. Now, I am looking for an
elegant
way to automate that control from [perhaps] a script file, probably
using
xml.

The sticky part is translating something I de-serialize from the file into
a
series of 'instructions' that my classes can understand as commands for
the
external equipment, including timing and scheduling.

I just occurs to me that perhaps what I am after is a pattern. A
suitable
pattern for this scenario might set me on the right road.

Charles


"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message
It is too vaugue, you need to have a more defined requirement.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

This is a bit of a vague question, but I am just starting on this,
and
wonder if anyone has ideas of where to start.

I have a program that controls some external equipment. It sends messages
in
various flavours to cause the equipment to turn signals on and off,
and
change voltages and such like.

Attached to this external equipment, is another piece of equipment
that
responds to these changes in signals and voltages.

What I need to do is automate the way in which my program turns
these
signals on and off, and changes voltages in the external equipment.
I also
need to do it in such a way that it is configurable without changes
to
source code.

My first thoughts are towards some kind of script that I interpret
and use
to determine what actions my program must take. The script would need
to
be
flexible enough to allow me to specify what signals are controlled,
in
real
time, and what voltages are set and over what time period they
should
change. It would also need to allow me to monitor status from the external
equipment in a given time frame to determine if actions had been
successful
or not.

That is as far as I have got. Is this type of application familiar
to
anyone, and does anyone have any suggestions regarding how to go
about
this?
Some examples of scripts that make this type of operation possible?

As I say, it is a bit vague at this stage, and this is probably not
the
very
best place to be asking, so if anyone knows where I would be better asking
that would be helpful too. Otherwise, any pointers welcome.

TIA

Charles
 
I see; providing the control is only in one direction then using XML is an
excellent way to do it. Each node could be a scheduled event which could be
repeating or single instance with the attributes to the node providing the
target and the command verb and parameters. You then write a windows service
which creates the event objects as windows processes. The service keeps
check on the status of the XML file and checks to see if the parameters and
lifetime of the process has been altered, is in service etc and makes
appropriate changes.

However, if there are dependencies between control process event, these need
to be synchronised somehow.

Just my thoughts, hope they may help in some small way.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

Charles Law said:
Hi Terry

It is more the general technique I am after, rather than specifics.

I don't think I can easily be less vague, although I can provide further
details and answer specific questions if it helps.

The requirement, if you like, is to automate control of the external
equipment in a runtime configurable way. I already have a set of classes
that can be used to control the equipment. Now, I am looking for an elegant
way to automate that control from [perhaps] a script file, probably using
xml.

The sticky part is translating something I de-serialize from the file into a
series of 'instructions' that my classes can understand as commands for the
external equipment, including timing and scheduling.

I just occurs to me that perhaps what I am after is a pattern. A suitable
pattern for this scenario might set me on the right road.

Charles


"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
It is too vaugue, you need to have a more defined requirement.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

messages to
be the
very
 
Yes, indeed helpful. Along with the Command pattern suggestion I think this
could be a good way to go.

Charles
[One instinctively knows when a thing is right]


One Handed Man ( OHM - Terry Burns ) said:
I see; providing the control is only in one direction then using XML is an
excellent way to do it. Each node could be a scheduled event which could be
repeating or single instance with the attributes to the node providing the
target and the command verb and parameters. You then write a windows service
which creates the event objects as windows processes. The service keeps
check on the status of the XML file and checks to see if the parameters and
lifetime of the process has been altered, is in service etc and makes
appropriate changes.

However, if there are dependencies between control process event, these need
to be synchronised somehow.

Just my thoughts, hope they may help in some small way.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

Charles Law said:
Hi Terry

It is more the general technique I am after, rather than specifics.

I don't think I can easily be less vague, although I can provide further
details and answer specific questions if it helps.

The requirement, if you like, is to automate control of the external
equipment in a runtime configurable way. I already have a set of classes
that can be used to control the equipment. Now, I am looking for an elegant
way to automate that control from [perhaps] a script file, probably using
xml.

The sticky part is translating something I de-serialize from the file
into
a
series of 'instructions' that my classes can understand as commands for the
external equipment, including timing and scheduling.

I just occurs to me that perhaps what I am after is a pattern. A suitable
pattern for this scenario might set me on the right road.

Charles


"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message I
also and
use
need
 
Charles,
What methods of communication is available to the equipment ? TCP/IP?
Does the equipment connect through a hub to a lan?
The mfg should provide some info - like "if you send "X" signal - the
equipment wil do 'so-n-so' does the equip have a network card? can you
telnet to it?
This sounds interesting. but mo info

you said the equip does all the voltage changing - depending on the signal
you send to it - and that equipment talks to (controls) other equipment -
Sounds like a distributed control system (DCS) - common to PLCs and some
Instrumentation
Fisher Controls, Allen Bradley, Modicon are a few of the players
 
Hi Hal

We (the company I am working with) are the manufacturers of the external
equipment, so we have our own comms protocol for this. The equipment is
connected via a simple serial/USB link.
you said the equip does all the voltage changing - depending on the signal
you send to it - and that equipment talks to (controls) other equipment -

It's actually the other way around: we send commands to the external
equipment, and it changes signals and voltages to the devices on the end.

The actual mode of communication is not so much the problem as we already
have that in place. It is the automation of the control that we are looking
at now, and from earlier suggestions it looks like the Command pattern is a
good avenue.

Do you have any experience of that pattern (or others) in this type of
application?
Sounds like a distributed control system (DCS) - common to PLCs and some
Instrumentation

You are on the right lines; it is actually ATE (automatic test equipment)
for use in a production test environment.

Charles
 
Charles Law said:
Hi Hal

We (the company I am working with) are the manufacturers of the external
equipment, so we have our own comms protocol for this. The equipment is
connected via a simple serial/USB link.


It's actually the other way around: we send commands to the external
equipment, and it changes signals and voltages to the devices on the end.

The actual mode of communication is not so much the problem as we already
have that in place. It is the automation of the control that we are looking
at now, and from earlier suggestions it looks like the Command pattern is a
good avenue.

Do you have any experience of that pattern (or others) in this type of
application?


You are on the right lines; it is actually ATE (automatic test equipment)
for use in a production test environment.

Charles

Anything you can do manually, you can automate with AutoIt

http://www.autoitscript.com/autoit3/

The forum is magnificent for help...

Lar.
 
Hi Lar

Thanks for the link. However, it is not the UI that I need to automate, but
objects at a much more lower level. The user will see progress indications
on the screen of the schedule that has been automated, and be able to stop
and start it, repeat bits of it and such-like.

Charles
 
Back
Top