Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 5:06 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Opus and PC interface card:Any C# experts out there?
PostPosted: January 18th, 2007, 2:18 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
For a long time, I have been trying to find a way of using OPUS with a PC interface card. This would create a phenomenally powerful piece of kit, with many possible applications. I have a Velleman 8055 (USB interface), which has digital/analogue inputs and outputs, however, the software supplied with the board is very poor, and Velleman have not offered any support. There is no way of controlling the card directly from OPUS. The Velleman site has a link to one developer who has produced a C# program for controlling the card. This runs as a windows application. I assume that I should be able to produce an EXE file from C#??

What I hope to be able to do is create a small command line EXE for each of the 8055 commands and run the EXE from opus. This would enable full control of the card from Opus. I doubt if it would be able to run very fast, but for many interface applications, this does not matter.

I have a C# console application which runs, but doesn't actually control the card, but I don't know enough about C# to see why it doesn't work.


Assuming I can get the command line applications from C#, the system could be used for home automation, intelligent alarm system, intelligent central heating control, lighting control---so many uses!!. There is no other program which matches OPUS for flexibility/speed, and to be able to control an external peripheral would make it a VERY powerful combination.
If there is anyone with C# experience who is willing to help, I would be very grateful.

_________________
Whoever designed this, never actually used it!


Last edited by sandyn on January 19th, 2007, 7:34 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Expanding on Opus
PostPosted: January 18th, 2007, 10:13 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Sandyn,
This in not a direct answer, but may provide a way to get there. Check out AutoHotkey utility. I have been searching a bit in this area and only recently came across this tool, so don't understand yet how I might use it. From the user perspective, embedding this could be intrusive? autohotkey.com

Am interested to hear what others may think -- taking Opus outside the box.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: January 18th, 2007, 10:37 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Thank you for the information. It could provide an indirect method if I created a hotkey EXE to control a windos GUI application which controlled the card. Very interesting.
I was looking for this capability for another purpose, so thanks very much!!!


I am still hoping there is a C# expert out there. I'm still trying to unravel the C# program. The syntax is very similar to Java, but the structure/constructors are slightly different. I'm sure it can be done.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: January 19th, 2007, 2:21 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
After much work, I finally managed to write the C# program and compile to an EXE file. I now have the ability to communicate via USB to an external card using Opus. Press a button ---the lights go on, press another---they go off. I can set the digital output or analogue output.
Next problem is how to read data from the card into OPUS????.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: January 19th, 2007, 3:37 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
The simplest solution would be to get your interface program to write the data to a file or the registry, and read those results with the Read File/Registry actions.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 19th, 2007, 7:32 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Thanks Duncan,
I've had a look at which seems to be the easiest to do.
Clipboard, text file, registry, database---currently Text file looks the easiest.
Is writing to the registry likely to trigger virus checkers??

If I can get the data from the interface card to the PC, I'll have full functionality of the interface card, analogue IN/OUT digital IN/OUT.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: March 7th, 2007, 1:15 pm 
Offline

Joined: February 5th, 2006, 3:39 am
Posts: 55
Location: Scotland
How did you get on with this project Sandyn?

Have you managed to get a suitable Opus presentation to interact with your card?

I am asking as I may want to do something very similar and would like to know the pitfalls beforehand


Top
 Profile  
 
 Post subject:
PostPosted: March 8th, 2007, 11:44 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I got it working very well. I use C# to drive the interface card then write the information to the registry. I then read the registry in opus. I have a demonstration system which uses a passive infra-red detector connected to the interface card, when someone enters the room, the PC asks them what they want---then tells them the time. The card has 5 digital and 2 analogue inputs. 8 digital and 2 pulse width modulated outputs.
There are various problems--basically the interface card is a 'hobby' card, so it's not very accurate. It will never be able to run very fast. The other niggle is that I have to create an EXE in C# which contains the card function I need, then I launch the EXE from Opus, but I haven't found a suitable way of hiding the command window, which never looks good...there are ways of hiding windows, but they tend to look like a virus.
Using the PC interface linked to real time speech synthesis is incredibly powerful. If you need more information, contact me off-line.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group