Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
LabVIEW-Measurements.pdf
Скачиваний:
61
Добавлен:
29.05.2015
Размер:
3.37 Mб
Скачать

Chapter 20 VISA in LabVIEW

Shared Locking

There might be cases where you want to lock access to a resource but selectively share this access. Figure 20-8 shows the Lock VI in complex help view.

Figure 20-8. VISA Lock Function Icon

Lock type defaults to exclusive, but you can set it to shared. You can then wire a string to requested key to be the password needed for another application to access the resource. However, the VI assigns one in access key if you do not ask for one. You can then use this key to access a locked resource.

String Manipulation Techniques

You have learned that most LabVIEW instrument driver problems can be solved without modifying the instrument driver code. However, in a few situations, code modification is necessary. This section describes some fundamental methods of instrument communication and introduces you to some commonly-used functions in LabVIEW instrument drivers.

How Instruments Communicate

Recall that the two main types of instrument communication are message-based and register-based.

No standards exist for register-based instrument communication. Each device operates independently, and the instrument manual is the best resource for learning how to program it.

Building Strings

When communicating with a message-based instrument, you must format and build the correct command strings, or the instrument will not perform the appropriate operation or return a response.

Typically, a command string is a combination of text and numeric values.

Because the instruments require that the entire command string be text, you

© National Instruments Corporation

20-9

LabVIEW Measurements Manual

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]