LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using clocked lines

This is how I want it to be. My address (16) lines and some other lines (ALE, IOW, IOR CLK) are connected to the 6289, and my (16) data lines to the 6541. I am using RTSI cable to synchronize the clock and trigger at the same time all lines/signals. So I want to write a xxxxH value into certain register (address lines). And then I want to verify whether those registers whether they changed their values to the assigned value.

0 Kudos
Message 11 of 18
(1,655 Views)
This is what I came up with so far. So, basically, I am writing xxxxH value into register which I don't know how to select (i.e. I need to write to registers that are 02H, 04H, 06H, etc... with base of 300H). Then, I want to read those values after they have been written.
Any suggestions ?
0 Kudos
Message 12 of 18
(1,641 Views)

Intern,

Here are a few suggestions on how to revise your code:

- Delete the constant for your task, as you are assigning analog channels to a digital task.

- You do not need to assign all of the properties in the DAQmx property node, as the ‘relative to’ and ‘offset’ are default values and will not change anything. The ReGen Mode may be useful if you do not want to allow regeneration

- If you want to continuously change the sample you write, change the ‘finite’ samples to ‘continuous’ in the task timing, otherwise the first set of samples will be written and no more.

- Discard the second loop and put the property node in the first loop with the DAQmx write. If you leave it as is, it will always return the same numbers as the card has finished generating.


There are many documents on our website which I would strongly encourage looking at and demonstrate how to get started and use DAQmx (see below). There are also many example programs that ship with LabVIEW ( Help >> Find Examples >> Hardware Input and Output >> DAQmx )

Getting Started with NI-DAQmx: Basic Programming with NI-DAQmx

Getting Started with NI-DAQmx: Getting Started with NI-DAQmx Programming in LabVIEW

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications


David L.
Systems Engineering
National Instruments
0 Kudos
Message 13 of 18
(1,628 Views)
here is a start to your task.
what you have is simply a starting task, the source is empty right now because i dont have your card on my laptop. you will have to put there something like "digital 1D U16", from the browsing menu.
then there is the frequency choice, where the clock is onboard. you can go very slow, in order to measure easily on the scope.
next element is to write an array of values that you send out. it will send them at the rate you defined first.
last element is task start, wait until done witha timeout, and then finish.
 
but that was the easy part. you still need to know what you want to send out, at which rate, and how does it relate to your input.
i still dont understand what you are going to measure: the values you sent out?? what for, since it is computer generated, you already know what they are!
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 14 of 18
(1,621 Views)

Thank you. It helps a lot. These are the tasks (VIs) I want to be able to do:

1. Write one xxxxH value to register (PCI-6289) and read it (to make sure that ISA bus works correclty)

2. Write one xxxxH value to multiple registers and read all of them.

3. Write one xxxxH value to a register and read/analize the output line that is connected to other card (PCI-6541).

4. Write different xxxxH values into different registers, one following another and read/analyzie the output line at PCI-6541.

5. Write different xxxxH values into different registers at the same time (opposite of the previos task).

Since the max rate of the PCI-6289 is 10MHz and of PCI-6541 is 50MHz, I am using RTSI cable since my address lines are connected to the 6289 and data lines and output lines to the 6541. And since ISA bus works on 8MHz, I would use this frequency.

The basic understanding of my project is to any written value into certain register(s), does something different to my digital outputs. So in order to test outputs, I need to test the ISA Bus itself first, by writing and reading from it, rigth ? At the output lines, I am measuring PW, delay times, max/min values, all the posible things I am able to measure with 6541.

 

0 Kudos
Message 15 of 18
(1,609 Views)

Hello THe Intern

 

sorry i was out until now.

did you manage to solve your problem? personnally i have no knowledge of ISA bus, so i dont know how the communication is performed. is it standard that you have to read the information you actually sent out? this seems to me very weird.

what is the time delay between command and answer from the external instrument? there must be a communication protocol, that can be followed step by step.

good luck!

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 16 of 18
(1,578 Views)

So as of right now, I have something done for my ISA Bus (Read cycle), but nothing close. I attached the VI I have done so far. I hope by looking at it and by looking below of how the ISA Bus works, you will get the idea of where I am now and what needs to be changed. Couple of things to note: Clock has to be 8MHz and it will supply entire system (all lines). All lines (CLOCK, (B)ALE, 16 ADDR lines, /IOR, /IO16, CHRDY) are coming from NI 6289, except 16 DATA lines that are coming from NI 6541. I am managing the clock of 8MHz between these two cards by using RTSI cable so that both cards works at 8MHz. I wrote some comments in VI so that you get a little better picture of what each line suppose to do. All the lines/hardware are impleneted into each DAQmx Assistant. I definitely don't know how to get the data after proceeding through ISA bus, I have two ways created. On the end, after writing the address from which I want to read data from, I at the same time want to see graphically every line above mentioned and make sure it mathces the graph given below that desrcibes how ISA bus works.

 

16-Bit I/O Bus Cycles

                         ________
BALE      ______________|        |_____________________________
          _____________  __________________________________  __
SA(15:0)  _____________><__________________________________><__
          _________________                                 ___
-IOCS16                    |_______________________________|
          _____________________                          ______
-IOR/W                         |________________________|
                                        __________________
SD(15:0)  -----------------------------<__________________>----
 (READ)
                                  ________________________
SD(15:0)  -----------------------<________________________>----
 (WRITE)
          _______________________ _ _ _ _ _ _ _ _ _ _ ______
I/OCHRDY                         |___________________|
0 Kudos
Message 17 of 18
(1,527 Views)

Hi Intern,

I will mainly concentrate on core programming features and functionality, and I believe a solid understanding of this will eliminate some trivial errors. When we have / create a DAQmx task, we will want to either use a DAQ Assistant OR use DAQmx VI’s. The DAQ Assistant (my recommendation to continue with) allows you to configure all options shown in your VI with DAQmx VI’s.(timing, triggering, and clock signal). Also, if you are doing acquisition from multiple lines on the same board (6229 for DAQmx) you can put multiple digital lines in one DAQ Assistant. However, you cannot combine digital lines from more than one board in a DAQ Assistant.

Also, the HSDIO driver (used with the 6541) is a completely separate driver from the DAQmx driver (used with the 6289), therefore has completely separate VI’s and will give errors if used in conjunction with DAQmx.  The HSDIO Express generation is a great tool, but when used as ‘start continuous’, it must be used in conjunction with a ‘stop continuous’, other wise this is basically starting the task and never finishing or clearing it. The help on the right hand side of all Express Assistants’ is a fantastic tool to use for questions and information. (See picture below - This was taken from the NI-HSDIO Express ( Generation ) ).


Message Edited by David L. on 10-03-2007 06:43 PM

David L.
Systems Engineering
National Instruments
0 Kudos
Message 18 of 18
(1,504 Views)