Тёмный

LabVIEW code: Event-driven producer-consumer state machine (walk-through) 

NTS
Подписаться 20 тыс.
Просмотров 33 тыс.
50% 1

Developer walk-through for the "pc_producer-consumer-state-machine" LabVIEW project available for download at learn-cf.ni.com/teach/riodevg... that covers this topic: "Create a responsive user interface based on two loops operating in parallel: the "producer" loop event structure responds immediately to user interactions such as button clicks and mouse movements that send commands through a queue to the "consumer" loop which performs the required tasks. Separating the state machine into two loops allows the user interface to remain responsive should a consumer task require an unusual amount of time or must wait for a shared resource to become available."
See the "RIO Developer Essentials Guide for Academia" available at learn-cf.ni.com/teach/riodevg... for more video tutorials related to programming, architecting, and networking with LabVIEW and NI Academic RIO products.

Наука

Опубликовано:

 

29 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@sergioa.cervantes4108
@sergioa.cervantes4108 4 года назад
Very clear and concise. Thanks a lot.
@mehdipaco88
@mehdipaco88 6 месяцев назад
This was very helpful! Thanks
@ericbrenner690
@ericbrenner690 3 года назад
A couple of things I see where improvements can me made. Why not just put the Case Structure right around your Event Structure and wire the error cluster to it? That eliminates the guard clause needed after the Event Structure and makes the top loop a event driven state machine. In the bottom loop, you don't need that 100 milliscond ms to Multiple. Your Deqeue Element will wait until data comes in or the shutdown clause is sent. Get rid of the guard clause since you don't need it around the dequeue element. As a matter of fact, I'd put one large case structure around the entire Consumer Loop While Loop and wire the error cluster to it just like I mentioned in the top loop. Doing these things would make your code more efficient.
@YM-lm8xr
@YM-lm8xr 3 года назад
wow, this comment of yours actually solved my current problem! thanks a lot!! Feeling lucky!
@EmbeddedSorcery
@EmbeddedSorcery 5 лет назад
Is there any way to stop execution in the middle of a state? Essentially skip to the end where it will then realize the next state in the queue is "stop" or "exit."
@itsnotallrainbowsandunicor1505
@itsnotallrainbowsandunicor1505 4 года назад
Have a look at "Traffic Lightcontroller QSM" by Alex See on youtube, /watch?v=1tgnc5OuzV0 I have built the setup and tried it and it works. There is another youtube vid, "LabVIEW Tips&Tricks Episode 3: Event driven state machine" by National Instruments Eastern Europe, which has play, pause, and stop. Try "State Machine - LabVIEW Design Patterns" by LabVIEW ADVANTAGE as well
@sirhoschi
@sirhoschi 2 месяца назад
looks like a QSM
Далее
LabVIEW procedure: Make your first FPGA application
31:08
Наше обычное утро 💕
00:42
Просмотров 1,5 млн
LabVIEW procedure: Make your first RT application
24:43
LabVIEW code: Queued state machine (walk-through)
12:39
LabVIEW Core 3: 3 CREATING AN APPLICATION ARCHITECTURE
30:47
Queued State Machine QSM - LabVIEW Design Patterns
6:25
LabVIEW code: Queue (walk-through)
3:34
Просмотров 12 тыс.
State Managers Are Making Your Code Worse In React
13:33
Telefonu Parçaladım!😱
0:16
Просмотров 27 млн
Samsung laughing on iPhone #techbyakram
0:12
Просмотров 4,4 млн