完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
由于某种原因,我不能删除我的旧帖子。
但我最初的项目是使用了一个带有两个不同模块的NIDaq。 一个将读取电阻器和另一个将打开和关闭电源的模块的电压。 很简单。 我是编程的新手,但我对计算机硬件和软件有广泛的了解。 所以说我正试图像我说的那样完成。 创建电压通道启动读取并打开和关闭继电器,系统读取5秒钟。 最后,结果将是当电源被关闭和关闭时电阻器的电压降,而另一个数据读数是数据。 通过这些例子,我发现多线程选项听起来就像我需要的那样。 如果我在一个线程上设置readdaq而在另一个线程上设置了relaydaq,并且在继电器daq之前有一个延迟,则可以在readdaq运行时打开和关闭继电器。 我想这个想法是多线程意味着并行运行多个进程。 (同时)在打开多线程程序应该如何运行的示例之后,我决定运行调试,看看执行顺序如何让我惊讶的是,这个例子没有在同一时间执行,不过它只是在做什么 只是在不同的处理器上从用户对象转到用户对象。 女巫和我从纽约到加利福尼亚州,当坦克变低时从汽车跳到汽车是一回事。 (糟糕的比喻,但你得到了重点)所以也许我只是错了,来自安捷伦的人没有花时间在同一时间写两个执行序列点。 但是我完全怀疑这是因为我只是制作了一个非常简单的程序并且线程不会同时执行。 你可以打开这个例子。 你会看到我在说什么。 如果我错了请告诉我,因为这没有任何意义,因为我无法找到有关如何同时运行两个niDaq模块的任何文档。 多仪器不将daq视为仪器。 以上来自于谷歌翻译 以下为原文 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. |
|
相关推荐
2个回答
|
|
有趣的帖子。
我还没有使用VEE 9.2,但我想提出几点意见。 在多线程环境中进行调试很困难,因为您试图“减慢”正在发生的事情,但当然您的通信,仪器等也不会相应减慢。 如果您有执行流程等,那么当然VEE需要尽可能地模拟多线程(这是一个单词吗?)。 如果您尝试使用任何其他语言调试相同的过程,您将看到同样的事情 - 它只表示一次停止在一个线程中。为了演示多线程操作,您需要有一些实时工作的动态显示 0.2。 根据您对计算机硬件和软件的广泛了解,您需要了解硬件争用,即多个线程访问相同硬件的情况。 根据您的仪器通信,您需要考虑是否可行。 例如,如果继电器和测量值在同一仪器中,那么仪器是否能够进行多线程(非常不可能),即使它们位于同一总线上,也能够同时处理多个仪器? 以上来自于谷歌翻译 以下为原文 Interesting post. I'm not using VEE 9.2 as yet but there are a couple of comments I'd like to make. 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? |
|
|
|
您好,我刚刚安装了Labview,看看它在运行相同任务时的行为方式。
当您运行具有多个线程的vi时,您实际上可以看到同时运行的两个执行点。 我猜测,当他们从unix移植它时,来自vee的人只是懒得完成这个。但是NIDaqs支持多任务。 Witch意味着您可以在同一个Daq但不同的模块上创建两个不同的任务。 女巫我没有看到这是不可能编码的,因为有两种不同的乐器。 然而,我刚刚发现声称VEE将不再支持NI硬件启动版本9巫婆是一种****,因为它会使ve更灵活。 放下vee是一个很好的工具,我将继续使用它,但是他们在修订更新方面做得非常糟糕。 我希望他们将来会变得更好。 以上来自于谷歌翻译 以下为原文 Hello, I just installed Labview to see how it behaves wile running the same task . When you run a vi with multiple threads you can actually see the two execution points running in the same time. I am guessing that the guys from vee just got lazy on getting this accomplished when they ported this from unix. However the NIDaqs support multi tasks. Witch means you can create two different tasks on the same Daq but different modules. Witch i do not see y this is not possible to code since there are seen as two different instruments. However I just found the statement that VEE will no longer support NI Hardware starting verion 9 witch is kind of **** since it would make vee more flexible. Hands down vee is a great tool, and I will continue using it, but they are doing a terrible job on revision updates. I hope they get better in the future. |
|
|
|
只有小组成员才能发言,加入小组>>
1285 浏览 0 评论
2373 浏览 1 评论
2192 浏览 1 评论
2064 浏览 5 评论
2948 浏览 3 评论
1111浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
753浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
926浏览 0评论
1287浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 20:01 , Processed in 1.254157 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号