Simple C# programming help needed!

Comments & issues
Post Reply
bprion
Fresh meat
Posts: 2
Joined: Sun Oct 28, 2018 5:07 am
Contact:

Simple C# programming help needed!

Post by bprion »

I have a PhidgetInterfaceKit 0/0/4 and am using it to ring a bell for shift changes in my shop.

I will use a Windows 10 computer and make use of a scheduled task to accomplish this. I need to create an executable program that will close a contact for 3 seconds then open it.

I installed the proper libraries and can control the 0/0/4 manually with the Phidget Control Panel but now need to write an executable that can be called by a scheduled Windows task.

I have Visual Studio installed and am able to open the programming examples from the Phidgets website but they are all much more than I need for my simple project and I am not a programmer.

Would someone please give me the code needed to open , delay 3 seconds, then close a contact on my 0/0/4 board? Ideally this would be in C# since I have access to a developer who knows that language and could help with other general things.

Any help is greatly appreciated!
fraser
Engineering
Posts: 138
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: Simple C# programming help needed!

Post by fraser »

Assuming you've opened the channels and they're attached, you can use something like this:

Code: Select all

        Phidget22.DigitalOutput[] Relays = new DigitalOutput[4];
        private void PerformTask(int RelayIndex)
        {
            Relays[RelayIndex].State = false;

            System.Threading.Thread.Sleep(3000);

            Relays[RelayIndex].State = true;
        }
bprion
Fresh meat
Posts: 2
Joined: Sun Oct 28, 2018 5:07 am
Contact:

Re: Simple C# programming help needed!

Post by bprion »

Fraser,

Thanks very much for your reply.

Unfortunately, even with the code you provided, the demands of this project exceed my programming capabilities.

I am willing to pay you or another programmer to provide me with an executable program that I can call from Windows 10 Task Scheduler to ring the bell in my shop.

Are you interested in doing this?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests