VM167 excel VB code help on digital please

Hi
I am using the VM167 for motorcycle exhaust pressure motoring system and the analogue works great.
I am outputing into excel spreadsheet and graph based upon a mod of the demo excel sheet. No problem, in fact the response is impressive. Analogue working fine.

I am having p[roblems with the digital channel coding though.I have tested the board wiith the utility program digital samples and the it all lights up as it should.
Sounds pathetic I know but I can’t get the EXCEL code to activate the Digital outputs/inputs.

Can anyone give me a sample of an excel vba code /syntax that controls the digital channels that they know works
so I can confirm I’m not doing something stupid in the code /syntax. The excel sample provided doesn’t seem to do anything.

Many thanks
Phil

You have to use the function InOutMode to set the digital terminals as outputs or inputs.
Here is a snippet from the manual:

[color=#000080]InOutMode

Syntax
void InOutMode(int CardAddress, int HighNibble, int LowNibble);

Parameters
CardAddress: The address of previously opened card.
LowNibble: 0: the digital I/O terminals 1 to 4 are outputs
LowNibble: 1: the digital I/O terminals 1 to 4 are inputs.
HighNibble: 0: the digital I/O terminals 5 to 8 are outputs
HighNibble: 1: the digital I/O terminals 5 to 8 are inputs.

Description
Set the digital terminals either inputs or outputs.[/color]

Here is an example code to control the digital outputs:

Sub Button3_Click() InOutMode CardAddress, 1, 0 'digital terminals 1-4 are outputs and terminals 5-8 are now inputs OutputAllDigital CardAddress, 15 'set all the digital outputs 1-4 high End Sub

Here a snippet from the example code how to read the digital inputs:

Dim Digi As Long Digi = ReadAllDigital(CardAddress)

Many thanks ,I had not appreciated the full function of the inout mode.
Thanks for your help