Multiple IOW24's

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
eamo
Posts: 12
Joined: Fri Jul 09, 2010 11:15 am

Multiple IOW24's

Post by eamo »

Hi,
Im have trouble trying to use multiple IOW24's, i have two connected and am trying to acquire the serial numbers from each device, i used the SimpleIIC example as a guide but both devices are returning the same number.

Code: Select all

   WCHAR s[9];
	IOWKIT_HANDLE ioHandle;
	IOWKIT_HANDLE handles[16];
	IOWKIT_HANDLE tempHandle;

	ioHandle = IowKitOpenDevice();
	int numDevs = IowKitGetNumDevs();
	for(int i = 0; i < numDevs; i++)
	{
		tempHandle = IowKitGetDeviceHandle(i+1);
		handles[i] = tempHandle;
		IowKitGetSerialNumber(handles[i], s);
		cout << s << endl;
		IowKitSetTimeout(handles[i],1000);
	}

	IowKitCloseDevice(ioHandle);
Image

Thanks,
Eamonn
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: Multiple IOW24's

Post by Christoph Jung »

Take a look into the samples into the SDK. The SimpleIO-Sample for C shows how to get all serialnumbers from all devices.

Code: Select all

//Line 58 ... 70

	// Get number of IOWs in system
	numIows = IowKitGetNumDevs();
	printf("%d IOWs in system\n", numIows);
	// Get all IOW handles
	for (i = 0; i < numIows; i++)
	{
		// Get device handle and init object
		iows[i] = IowKitGetDeviceHandle(i + 1);
		// Get serial number
		IowKitGetSerialNumber(iows[i], sn);
		pid = IowKitGetProductId(iows[i]);
		printf("%d PID %x, S/N \"%ws\"\n", i + 1, pid, sn);
	}
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
eamo
Posts: 12
Joined: Fri Jul 09, 2010 11:15 am

Re: Multiple IOW24's

Post by eamo »

thanks, the examples where helpful, is there a version of iowkit.lib in OMF format as i am using Borland Turbo C++ and I think that converting the .lib from COFF to OMF may have impaired the functionality. I can get it to work as i want in VC++ 2010 but i need to use it with borland.
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: Multiple IOW24's

Post by Guido Körber »

No, we don't have the DLL in other formats. But the source of the DLL is part of the SDK, so you can recompile it with the required options.
eamo
Posts: 12
Joined: Fri Jul 09, 2010 11:15 am

Re: Multiple IOW24's

Post by eamo »

Is it possible to access different IOWarriors from separate programs on the same machine?
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: Multiple IOW24's

Post by Christoph Jung »

Not with the iowkit.dll version 1.5. This is to prevent malfunctions.
But you can use the "IOWarrior Socket Server" from Greinert http://www.iowss.greinert-dud.de/.
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
Post Reply