> For the complete documentation index, see [llms.txt](https://docs.aic-eec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aic-eec.com/embedded-systems/resources/basic-hardware-and-firmware/lab1-oscilloscope/waveform/lab-oscilloscope-and-function-generator.md).

# LAB: Oscilloscope and Function Generator

## **จุดประสงค์**&#x20;

1. สามารถอ่านค่า Oscilloscope ที่แสดงค่าสัญญาณที่ได้จาก function generator&#x20;
2. สามารถตั้งค่า function generator สร้าง Waveform ได้

## LAB:  Function generator สร้าง Waveform

ทดลองอ่านค่า Oscilloscope แสดงค่าสัญญาณที่ได้จาก function generator &#x20;

### อุปกรณ์ทดลอง

<table><thead><tr><th width="397">Component </th><th>Quantity</th></tr></thead><tbody><tr><td>myDAQ</td><td>1</td></tr></tbody></table>

![www.ni.com](/files/gdvTBDRonWnNFya2fu0T)

### โปรแกรม

1. Arduino IDE
2. โปรแกรม NI ELVISSmx

### Circuit Diagram

![](/files/M9ZA0zaqx3TvGTRcSOEX)

### ตัวอย่าง Function generator สร้าง Square wave&#x20;

ตั้งค่าโปรแกรม Function generator NI ELVISmx สร้าง Square wave ความถี่ 50Hz , Vpp 2V

* เปิดโปรแกรม NI ELVISmx InStrument Launcher >> Function generator
* ตั้งค่า โปรแกรม Function generator NI ELVISmx โดยไปที่ Waveform Settings และตั้งค่าตามรูปด้านล่าง

![Function generator NI ELVISmx](https://paper-attachments.dropbox.com/s_E32BE90F8E91E354B14DB9C10815D4F44640981FA0FE48AEE8513B5268D06F13_1600072286176_Function_set.png)

### ตัวอย่าง Oscilloscope แสดงสัญญาณที่ได้จาก Function generator&#x20;

ตั้งค่า Scale Volt/Div เท่ากับ 1V, Time/Div เท่ากับ 5 ms

* ปิดโปรแกรม NI ELVISmx InStrument Launcher >>Oscilloscope>>RUN

![Oscilloscope NI ELVISmx](https://paper-attachments.dropbox.com/s_E32BE90F8E91E354B14DB9C10815D4F44640981FA0FE48AEE8513B5268D06F13_1600072652495_Reading+guide2.png)

&#x20;  จากกราฟด้านบนแสดงค่าที่ Oscilloscope ได้รับค่าสัญญาณจาก Function Generator สังเกตที่ค่าใต้กราฟที่ Oscilloscope อ่านได้จะเท่ากับค่าที่ Function Generator สร้างสัญญาณขึ้น

### **บันทึกผลการทดลอง**&#x20;

1. ให้ทดลองตั้งค่า Function Generator เพื่อได้ผลลัพท์เหมือนกับกราฟที่แสดงผลบน Oscilloscope ดังภาพที่ a, b, c ด้านล่าง&#x20;
2. บันทึกผลการทดลองและอธิบายขั้นตอนการตั้งค่า Function Generator ลง template ที่ได้รับมอบหมาย&#x20;

![a.](https://paper-attachments.dropbox.com/s_E32BE90F8E91E354B14DB9C10815D4F44640981FA0FE48AEE8513B5268D06F13_1600073302894_image.png)

![b.](https://paper-attachments.dropbox.com/s_E32BE90F8E91E354B14DB9C10815D4F44640981FA0FE48AEE8513B5268D06F13_1600072850932_image.png)

![c.](https://paper-attachments.dropbox.com/s_E32BE90F8E91E354B14DB9C10815D4F44640981FA0FE48AEE8513B5268D06F13_1600073038647_image.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aic-eec.com/embedded-systems/resources/basic-hardware-and-firmware/lab1-oscilloscope/waveform/lab-oscilloscope-and-function-generator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
