For some reason i can not remove my old post. But my original project was to used an NIDaq with two different modules in it. One that will read the voltage across a resistor and another module that will turn the power on and off. Very Simple. I am new at programing vee but i do have a large extensive knowledge of computer hardware and software. So that said I am trying to accomplish just as i said. Create a voltage channel start read and turn a relay on and off wile the system reads for 5 seconds. In the end the result will be the voltage drop from the resistor as power was being shut on and off during witch the other ni daq reading was the data.
Looking through the examples i found the Multi-thread option witch sounded like just what i needed. If i set the readdaq on one thread and the relaydaq on another with a delay ahead of the relay daq i can turn the relay on and off as the readdaq is running. I guess the idea is that Multi-thread means to run more then one process in parallel. (at the same time)
After opening the example of how a multi-thread program should run i decided to run the debug and see how the execution sequence witch to my surprise the example was not executing in the same time, however all it was doing was just going from user object to user object on a different processor. Witch is the same thing as me going from NY to Californian and jumping from car to car when the tank gets low. (bad analogy but you get the point)
So maybe im just wrong and the guys from agilent did not spent the time to write in vee two execution sequence dots going in the same time. However i totally doubt this since i just made a really simple program and the threads do not execute at the same time. You can just open the example. you will see what I am talking about.
If i am wrong please let me know because this makes no sens as i was not able to find any documentation on how to run two niDaq modules in the same time.
Multi-instrument does not consider the daq as an instrument.
Looking through the examples i found the Multi-thread option witch sounded like just what i needed. If i set the readdaq on one thread and the relaydaq on another with a delay ahead of the relay daq i can turn the relay on and off as the readdaq is running. I guess the idea is that Multi-thread means to run more then one process in parallel. (at the same time)
After opening the example of how a multi-thread program should run i decided to run the debug and see how the execution sequence witch to my surprise the example was not executing in the same time, however all it was doing was just going from user object to user object on a different processor. Witch is the same thing as me going from NY to Californian and jumping from car to car when the tank gets low. (bad analogy but you get the point)
So maybe im just wrong and the guys from agilent did not spent the time to write in vee two execution sequence dots going in the same time. However i totally doubt this since i just made a really simple program and the threads do not execute at the same time. You can just open the example. you will see what I am talking about.
If i am wrong please let me know because this makes no sens as i was not able to find any documentation on how to run two niDaq modules in the same time.
Multi-instrument does not consider the daq as an instrument.
1. Debugging in a multi-threaded environment is difficult simply because you are trying to 'slow down' what's happening but of course your comms, instruments etc. don't slow down accordingly. If you have the execution flow on or the like then of course VEE needs to emulate as best it can the multithreadedness ( is that a word? ). If you were to try debugging the same process in any other language you'll see the same thing - it only indicates stopping in one thread at a time.
To demonstrate the multi-threaded operation you need to have some dynamic display which works real time.
2. As you'll know from your extensive knowledge of computer hardware and software you need to be aware of hardware contention i.e. where more than one thread is accessing the same hardware. Depending on your instrument communications you need to consider if that is possible. For instance, if the relay and measurements are in the same instrument, is the instrument capable of multi-threading ( very unlikely ) and even if they are on the same bus, is that capable of dealing with more than one instrument at a time?