Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

using pci6602 with simulink

hello..
> i have some problem with simulink.for your information,i'm using the 
> latest version of matlab R2008a.
> i'm using the digital input and digital output in data acquisition 
> toolbox.i'm using the data acquisiton card from national instrument 
> that is PCI6602.but i have some problem when i want to run it.the 
> error appeared "data types at the input port must be logical type".i 
> have upload the block diagram of my project
> the configuration parameters i not change it.
> ok,thank you
0 Kudos
Message 1 of 5
(4,369 Views)

Hi keluangman,

The digital output requires a logical data type and you have currently wired a sine wave to it according to your block diagram. You should try wiring a boolean data type as an input.

Steve B

0 Kudos
Message 2 of 5
(4,339 Views)
thank you. but can you give a suggestion to replace the sine wave with the boolean data type.what kind of boolean data type that i should use?
0 Kudos
Message 3 of 5
(4,333 Views)

Hello keluangman,

The PCI-6602 is a counter/timer board that can be used to input and output digital signals.  This device responds and outputs TTL specified signals.  As a result, to output a digital signal on any of the digital output lines (like port 0 line 0; P0.0 for instance) you need a data type that represents this line.  For a single line you would need a Boolean data type (represented as a TRUE or FALSE; sometimes a ‘0’ or ‘1’).  If you had multiple lines associated with a single output option, you would need an array of Booleans (one element in the array for each line on the device) or a integer in which each bit on the integer represented a line on the device. 

Regards,
Browning G
FlexRIO R&D
0 Kudos
Message 4 of 5
(4,311 Views)
thank you for your help...:)
0 Kudos
Message 5 of 5
(4,303 Views)