08-08-2007 01:05 PM
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.
08-09-2007 12:53 PM
08-09-2007 03:36 PM
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
08-10-2007 12:38 AM
08-10-2007 10:24 AM
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.
08-20-2007 05:50 AM
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!
10-02-2007 05:53 PM
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.
________
BALE ______________| |_____________________________
_____________ __________________________________ __
SA(15:0) _____________><__________________________________><__
_________________ ___
-IOCS16 |_______________________________|
_____________________ ______
-IOR/W |________________________|
__________________
SD(15:0) -----------------------------<__________________>----
(READ)
________________________
SD(15:0) -----------------------<________________________>----
(WRITE)
_______________________ _ _ _ _ _ _ _ _ _ _ ______
I/OCHRDY |___________________|
10-03-2007 06:43 PM - edited 10-03-2007 06:43 PM
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