06-24-2009 07:34 AM
Hi
I'm busy with the simulation of the NI-USB 6509 device, my aim is to configure 6 ports (48 lines) as input and the other 6 port as output and to display the result on the front panel as a 1D boolean array of 48 read and write lines, where i can toggle the switchs to write data either 1 line or port or all 48 lines at a time and read the result on the boolean LEDS either 1 line or port or all 48 lines at a time.
I'm aware i have to have the physical USB 6509 device to read the input by connecting the output to the input using the cables or accesories supplied with but my only worries were:
1) When i ran the simulation i can write values in the form of binary numbers but in what order are they written to the ports or lines, is it LSB first or MSB wrt to device Port 0/line 0.
2) Because the output can't be connected to the input throught software, will the written values be the same or read in same order (MSB first etc) when tested physically because when i ran the simulation, the input was just reading (counting in binary values left most bit first, from line to line on per port basis. Is it by default a counter input when there is no hardware connected and if that is the case why must it count or read same values across three ports (line0_32 etc) i.e it counts across all three ports at a time e.g [11111110 11111110 1111110] for decimal 255; shouldn't it be [11111110 00000000 00000000] and then rolls over to the nest port if the first port is full with [11111111].
3) Is it possible to write to or read from 6 ports (48lines) at a time and display the result in one 1D boolean array ( 1row of 48 LEDS) or otherwise because in the device I/O VI, u can only select a max of 4 port (lines0_32) at a time what if u have to read/write and display morethan 32 lines at a time how do you do that.
Why can NI adds a polymorphic read/write VI that can read or write upto 96 lines in the case of NI-6509 devices.
Anyway thanks for reading my lengthy boring doubt, i'll appreciate any reply.
Rgds
Paul.
Solved! Go to Solution.
06-24-2009 10:45 AM
All of the bits are written at the same. If you write FF to an 8 bit port, then all pins output a 1 at the same time. If you read a port, all bits are read at the same time.
I have no idea why the simulated input is done that way. Since it's simulated, I don't really care what the random pattern is.
Yes, you can write to all ports at the same time (I already said this) and display the data read in a Boolean array. There is no problem specifying up to 8 ports for either a read or a write. There is no such VI called 'device I/O' so I have no idea what you are referring to. Either of the simple digital read examples can be setup for 8 ports. The Read Dig Port example cannot use a U32 port format read though.
07-02-2009 06:36 AM
Hi
Thanks for the insight.
What i meant by "Device I/O VI"; is the 'DAQmx Physical channel' function on the front panel, where you can select a line or port or lines_0-32 etc to be either input or output of a device.
I was tyring to say you're limited to the fixed option to select from the drop down arrow a max of 32 lines to write to or read from at a time although it is possible to read/write morethan 32 bits by selecting one line or port in-turn to sum up for morethan 32 lines.
In order words there are no options to select or configure lines_0-48 or lines_0-96 to perform write/read operations in one move although it can be done by selecting each line or port or a max of 32 lines at a time.
Rgds
Paul
07-02-2009 12:59 PM
I don't know why you marked your response as the solution and I don't understand what the problem is. If I simulate a 6509, the drop down for the physical channel shows all 96 lines. They are listed as Devx\port0\line0 through Devx\port11\line7. What is your version of DAQmx and are you sure it's a 6509 that is being simulated?
07-07-2009 05:21 AM
Hi
I don't know how it was marked as solution, it seems as if that was done automatically when i open your reply or otherwise. Anyway, with regards to my problem i don't how to explain further, i think i'll buy the physical board and experiment myself then i'll update you. Well thanks for the input.
Rgds