Question
· Jun 17, 2018

Connect to hardware

Hello,

If this question is in the wrong section, I apologise.

Has anyone ever used Cache Object Script to connect to any hardware such as a sensor?

What I mean is this :-

Lets assume that code has been written in Cache Object Script where it can detect breaks in electrical connections.

There is some sort of wire/cable that is plugged into the PC and then this wire/cable runs to say a house window or door and is connected to some sort of sensor, when the window/door is closed then the circuit is complete, when the window/door is open the circuit is broken and somehow Cache Object Script knows this and then records say $H in a global.

Does that make sense and could it be possible?

Jason

Discussion (2)0
Log in or sign up to continue

Whatever OS you use you will need some driver-like code to control the state of the connection at HW level.

Next COS may listen on a TCP or UDP port or poll the driver on a regular base.
Dependent on the intelligence of the driver it may even start an appropriate sessiom from the command line. 
Or run a call-in to Caché over the published interface.

But it is always some code external to Cache´to handle the HW.