<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1714354472473991136</id><updated>2024-08-31T15:55:21.956+07:00</updated><title type='text'>MS Access VBA code sample connected to Weight Balances via RS232 (serial port)</title><subtitle type='html'>Computer, Hardware, Software, Weight Scale, Weight Balance, RS232, MS Access Sample, Access db, Serial data, MSComm Control, XMComm control, Visual basic for application, VBA, VB, Access, Excel, Serial Port, Serial communication, for ms access, เครื่องชั่ง, ตาชั่งดิจิตอล, รับค่าจากเครื่องชั่ง</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-4683833727168965706</id><published>2012-02-11T09:05:00.000+07:00</published><updated>2012-02-11T09:22:28.363+07:00</updated><title type='text'>RS-232 : History ประวัติของ RS232 : from wiki</title><content type='html'>&lt;div class=&quot;dablink&quot; style=&quot;background-color: white; font-family: sans-serif; font-style: italic; margin-bottom: 0.5em; padding-left: 1.6em;&quot;&gt;
&lt;div style=&quot;font-size: 13px; font-style: normal; line-height: 19px; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
RS-232 was first introduced in 1962.&amp;nbsp;The original DTEs were electromechanical&amp;nbsp;&lt;b&gt;teletypewriters&lt;/b&gt;, and the original DCEs were (usually)modems. When&amp;nbsp;electronic terminals&amp;nbsp;(smart and dumb) began to be used, they were often designed to be interchangeable with teletypewriters, and so supported RS-232. The C revision of the standard was issued in 1969 in part to accommodate the electrical characteristics of these devices.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/7/76/ASR-33_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/7/76/ASR-33_1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
A&amp;nbsp;&lt;b&gt;teleprinter&lt;/b&gt;&amp;nbsp;(&lt;b&gt;teletypewriter&lt;/b&gt;,&amp;nbsp;&lt;b&gt;Teletype&lt;/b&gt;&amp;nbsp;or&amp;nbsp;&lt;b&gt;TTY&lt;/b&gt;) is a&amp;nbsp;electromechanical typewriter&amp;nbsp;that can be used to communicate typed messages from&amp;nbsp;point to point&amp;nbsp;and&amp;nbsp;point to multipoint&amp;nbsp;over a variety of communication channels that range from a simple electrical connection, such as a pair of wires, to the use of&amp;nbsp;radio&amp;nbsp;and&amp;nbsp;microwave&amp;nbsp;as the&amp;nbsp;transmission medium. They could also serve as a&amp;nbsp;command line interface&amp;nbsp;to early&amp;nbsp;mainframe computers&amp;nbsp;and&amp;nbsp;minicomputers, sending typed data to the computer with or without printed output, and printing the response from the computer.
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 13px; font-style: normal; line-height: 19px; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
Since application to devices such as computers, printers, test instruments, and so on was not considered by the standard, designers implementing an RS-232 compatible interface on their equipment often interpreted the requirements idiosyncratically. Common problems were non-standard pin assignment of circuits on connectors, and incorrect or missing control signals. The lack of adherence to the standards produced a thriving industry of breakout boxes, patch boxes, test equipment, books, and other aids for the connection of disparate equipment. A common deviation from the standard was to drive the signals at a reduced voltage. Some manufacturers therefore built transmitters that supplied +5&amp;nbsp;V and -5&amp;nbsp;V and labeled them as &quot;RS-232 compatible&quot;.&lt;/div&gt;
&lt;div style=&quot;font-size: 13px; font-style: normal; line-height: 19px; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;
Later&amp;nbsp;personal computers&amp;nbsp;(and other devices) started to make use of the standard so that they could connect to existing equipment. For many years, an RS-232-compatible port was a standard feature for&amp;nbsp;serial communications, such as&amp;nbsp;modem&amp;nbsp;connections, on many computers. It remained in widespread use into the late 1990s. In personal computer peripherals, it has largely been supplanted by other interface standards, such as&amp;nbsp;USB. RS-232 is still used to connect older designs of peripherals, industrial equipment (such as&amp;nbsp;PLCs),&amp;nbsp;console&amp;nbsp;ports, and special purpose equipment, such as a cash drawer for a cash register.&lt;/div&gt;
&lt;div style=&quot;font-style: normal; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;The standard has been renamed several times during its history as the sponsoring organization changed its name, and has been variously known as EIA RS-232, EIA 232, and most recently as TIA 232. The standard continued to be revised and updated by the&amp;nbsp;Electronic Industries Alliance&amp;nbsp;and since 1988 by the&amp;nbsp;Telecommunications Industry Association&amp;nbsp;(TIA).&amp;nbsp;Revision C was issued in a document dated August 1969. Revision D was issued in 1986. The current revision is&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;TIA-232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange&lt;/i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;, issued in 1997. Changes since Revision C have been in timing and details intended to improve harmonization with the&amp;nbsp;CCITT&amp;nbsp;standard V.24, but equipment built to the current standard will interoperate with older versions&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 11px; line-height: 10px; white-space: nowrap;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 13px; font-style: normal; line-height: 19px; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
Related&amp;nbsp;ITU-T&amp;nbsp;standards include&amp;nbsp;&lt;b&gt;V.24&lt;/b&gt;&amp;nbsp;(circuit identification) and&amp;nbsp;&lt;b&gt;V.28&lt;/b&gt;&amp;nbsp;(signal voltage and timing characteristics).&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/4683833727168965706/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/02/rs-232-history-rs232.html#comment-form' title='1 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/4683833727168965706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/4683833727168965706'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/02/rs-232-history-rs232.html' title='RS-232 : History ประวัติของ RS232 : from wiki'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-5126902245749659353</id><published>2012-02-07T13:59:00.001+07:00</published><updated>2012-02-07T13:59:41.890+07:00</updated><title type='text'>MS Access VBA connect to UWE GW-3000 Weight balance : เครื่องชั่งที่ได้สัมผัสอีกตัวโดยบังเอิญ</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
เข้าเรื่องตรงๆ ไปเลย เครื่องชั่ง UWE GW-3000 ตัวนี้ผมไม่มีคู่มือ ขอยืมรูปจากเว็บอื่นมาโชว์ล่ะกัน หน้าตาคล้ายๆ ข้างล่างนี้แหละ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhToJbU_3RQBR8ZEX6gllOl3j5d64aE1n80rXopfdmLtrO6lwh50YrDDHFTgCrOp5kc7eAA7bkofwxu5vqa-oV5tx4iT3ig6QaRzSU9WXdzGRM-6bCGooLaFMgJKX9G1SkUKJHvIQ1XJp1B/s1600/UWE+GW.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhToJbU_3RQBR8ZEX6gllOl3j5d64aE1n80rXopfdmLtrO6lwh50YrDDHFTgCrOp5kc7eAA7bkofwxu5vqa-oV5tx4iT3ig6QaRzSU9WXdzGRM-6bCGooLaFMgJKX9G1SkUKJHvIQ1XJp1B/s1600/UWE+GW.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;เหมือนเดิมก็คือเริ่มด้วยเบสิค ใช้ Hyperterminal เพื่อหาค่าที่จะใช้ในการเชื่อมต่อที่ตรงกับตัวตาชั่ง แล้วได้ค่าออกมาแล้วคนอ่านรู้เรื่อง ได้ค่ามาใส่ดังรูป แล้วก็มา Test หาค่า RThreshold อีกครั้งใน MS Access&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS9fK9MHxBcGGeCB4DP_Mj-5lIG_i-HtTmlSXRmQQg8ybIde6KPTndLplEL-R2yncy_0hyphenhyphenGI_EffCCg3-wrdorFHijrtJgiivUUwU7RYZyRfhjqmEH69htpQ1OTDeA5B_mHDXyeL3iLoM3/s1600/UWE+GW-3000_1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS9fK9MHxBcGGeCB4DP_Mj-5lIG_i-HtTmlSXRmQQg8ybIde6KPTndLplEL-R2yncy_0hyphenhyphenGI_EffCCg3-wrdorFHijrtJgiivUUwU7RYZyRfhjqmEH69htpQ1OTDeA5B_mHDXyeL3iLoM3/s640/UWE+GW-3000_1.JPG&quot; width=&quot;538&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
คราวนี้ตั้งตัวแปร Buffer ขึ้นมารับเพิ่มเติม เพื่อให้ได้เห็นค่าก่อนและหลังแยกข้อมูลออกมาใช้งานต่อไป&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ดังรูปข้างล่างเ่ช่นกัน&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiE-HOvi5_4F_HiTWyaWg-yHArZ-iINSsULd8m-knlXP47WLMWN77Bmw_aDKyvDsmw6_xa3D0Auiws9ey2EJgybW0MZU30SMC0YO7WP1dssnWIkd8VVLaMd7RQWUuYjB42QLIgcUzU6OVh/s1600/UWE+GW-3000.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiE-HOvi5_4F_HiTWyaWg-yHArZ-iINSsULd8m-knlXP47WLMWN77Bmw_aDKyvDsmw6_xa3D0Auiws9ey2EJgybW0MZU30SMC0YO7WP1dssnWIkd8VVLaMd7RQWUuYjB42QLIgcUzU6OVh/s640/UWE+GW-3000.JPG&quot; width=&quot;532&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
สั้นๆ แค่นี้แหละ หวังว่าคงเป็นประโยชน์ไม่มากก็น้อย สงสัยก็ถามกันมาได้ครับ&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/5126902245749659353/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/02/ms-access-vba-connect-to-uwe-gw-3000.html#comment-form' title='4 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/5126902245749659353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/5126902245749659353'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/02/ms-access-vba-connect-to-uwe-gw-3000.html' title='MS Access VBA connect to UWE GW-3000 Weight balance : เครื่องชั่งที่ได้สัมผัสอีกตัวโดยบังเอิญ'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhToJbU_3RQBR8ZEX6gllOl3j5d64aE1n80rXopfdmLtrO6lwh50YrDDHFTgCrOp5kc7eAA7bkofwxu5vqa-oV5tx4iT3ig6QaRzSU9WXdzGRM-6bCGooLaFMgJKX9G1SkUKJHvIQ1XJp1B/s72-c/UWE+GW.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-7535835214371998838</id><published>2012-02-02T12:35:00.003+07:00</published><updated>2012-02-02T12:35:37.216+07:00</updated><title type='text'>Linked น่าสนใจ</title><content type='html'>&lt;a href=&quot;http://home.comcast.net/~hardandsoftware/xmcomm.htm&quot;&gt;http://home.comcast.net/~hardandsoftware/xmcomm.htm&lt;/a&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.granite.ab.ca/access/serialport.htm&quot;&gt;http://www.granite.ab.ca/access/serialport.htm&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://home.comcast.net/~hardandsoftware/Downloads.htm&quot;&gt;http://home.comcast.net/~hardandsoftware/Downloads.htm&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/7535835214371998838/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/02/linked.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/7535835214371998838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/7535835214371998838'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/02/linked.html' title='Linked น่าสนใจ'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-6852188615484668475</id><published>2012-01-17T22:58:00.000+07:00</published><updated>2012-01-24T10:02:03.874+07:00</updated><title type='text'>Weight Balance : A&amp;D AD-4328 Data Format : เอามาให้ดูเล่น</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
เอามาให้ดูเล่นๆ ลองนับดูถ้าต้องเขียนรับข้อมูลต้องตรวจสอบอะไรบ้าง FORMAT เลือกได้อีกว่าจะให้ส่งออกมาอย่างไร เห็นมีถามกันในเว็บบอร์ดไหนผมก็จำไม่ได้เหมือนกันนิ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68jvnbNMgSmv2wS2XVrhXnuUwEIxJ__7d7nA-wSrEUw_JSoTOAzP5JBRN0_Hkhci8vHQC06EHG4ofBUtH_edjrmK3b5sJhEzlntoa57b8CEvvfOmAA8T4cHkxlBXgdWTgOf5DviYUg5u4/s1600/AD-4328+dataFormat.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;546&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68jvnbNMgSmv2wS2XVrhXnuUwEIxJ__7d7nA-wSrEUw_JSoTOAzP5JBRN0_Hkhci8vHQC06EHG4ofBUtH_edjrmK3b5sJhEzlntoa57b8CEvvfOmAA8T4cHkxlBXgdWTgOf5DviYUg5u4/s640/AD-4328+dataFormat.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/6852188615484668475/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/and-ad-4328-data-format.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/6852188615484668475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/6852188615484668475'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/and-ad-4328-data-format.html' title='Weight Balance : A&amp;D AD-4328 Data Format : เอามาให้ดูเล่น'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68jvnbNMgSmv2wS2XVrhXnuUwEIxJ__7d7nA-wSrEUw_JSoTOAzP5JBRN0_Hkhci8vHQC06EHG4ofBUtH_edjrmK3b5sJhEzlntoa57b8CEvvfOmAA8T4cHkxlBXgdWTgOf5DviYUg5u4/s72-c/AD-4328+dataFormat.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-4796808817395435700</id><published>2012-01-17T14:01:00.003+07:00</published><updated>2012-01-24T10:01:37.065+07:00</updated><title type='text'>MS Access VBA RE-ZERO Weight Scale : เซ็ทศูนย์ตาชั่งจากโปรแกรม</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
ทำการปรับปรุงฟอร์มก่อนเดินหน้าต่อสักนิด หน้าตาก็จะใกล้เคียงกับฟอร์มของ&lt;span style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Visual Basic&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV5Aj1Avt21C30wW3o0rnL_ZCpp72VEZkryrMFVh9ST6R_-X1gjzmqEpLgtWxuAOPrjvwpdhXRFnbQK0Pdh6vH7rN_nkqLVQuaZYE3w5ARlsbOwD6MWnlFQyBXDSm44VlJUZDZk4XZSGS2/s1600/FormImprove.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;415&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV5Aj1Avt21C30wW3o0rnL_ZCpp72VEZkryrMFVh9ST6R_-X1gjzmqEpLgtWxuAOPrjvwpdhXRFnbQK0Pdh6vH7rN_nkqLVQuaZYE3w5ARlsbOwD6MWnlFQyBXDSm44VlJUZDZk4XZSGS2/s640/FormImprove.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;ต่อไปจะเพิ่มปุ่มแล้วใส่คำสั่งสำหรับ RE-ZERO ตาชั่งจากในโปรแกรม โดยไม่ต้องไปกดที่ตาชั่งโดยตรง&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHX-z6ZCFlvLhMxqP4eHNd2I0OzpQLosT8YfdJzUK_FhEbwk1aAsKk87XjU9Hz2I_4SXBfR-q5BHjjl37TbkOmB5SyTh8aI_Gjd9UDKoQFerAHDd6WyI2lWBKM6guJUpharyy1NDaEa6nG/s1600/ReZero1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;414&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHX-z6ZCFlvLhMxqP4eHNd2I0OzpQLosT8YfdJzUK_FhEbwk1aAsKk87XjU9Hz2I_4SXBfR-q5BHjjl37TbkOmB5SyTh8aI_Gjd9UDKoQFerAHDd6WyI2lWBKM6guJUpharyy1NDaEa6nG/s640/ReZero1.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
จากนั้นไปอ่านคู่มือ ว่าต้องใช้คำสั่งอะไรส่งไปให้เครื่องชั่งเพื่อทำการ RE-ZERO&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkRGgvvZ1SU4n4nsiE6yMWEpSTzvNQyxY42yXkXfy7oE_xfIvmnEFxB3rhaalj42pxqR28d-UvX0ci4_TjfgmpLp4VPluT9CIBzHlVsj84haFUO8bcAsF8hnxDpooILdO2s7ZU0SG_4Tt5/s1600/ReZero2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;410&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkRGgvvZ1SU4n4nsiE6yMWEpSTzvNQyxY42yXkXfy7oE_xfIvmnEFxB3rhaalj42pxqR28d-UvX0ci4_TjfgmpLp4VPluT9CIBzHlVsj84haFUO8bcAsF8hnxDpooILdO2s7ZU0SG_4Tt5/s640/ReZero2.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
เข้าไปเขียนโค้ดใน VBA&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh16HkEzAatQDbkGuQ9ACyVgR1JZb3Pou__7JLjJ5OWA9wSKLBrHarB_rdPyN5jD-44t6GREvx8PhkG7tnTQQTi9ez2f5ER6OqE0QQvUyIgG7YR0DihzDvZ-7JaDqd_SxDxhpq8gx0G6BBO/s1600/ReZero3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh16HkEzAatQDbkGuQ9ACyVgR1JZb3Pou__7JLjJ5OWA9wSKLBrHarB_rdPyN5jD-44t6GREvx8PhkG7tnTQQTi9ez2f5ER6OqE0QQvUyIgG7YR0DihzDvZ-7JaDqd_SxDxhpq8gx0G6BBO/s640/ReZero3.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ลองดูซิว่าทำงานได้หรือยังโดย Run form ทดลอง Click ปุ่ม RE-ZERO ทดลองชั่งโดยวางของลงบนตาชั่ง กดปุ่ม RE-ZERO ในขณะของยังวางอยู่ เอาของออก กด RE-ZERO อีกครั้ง จะเห็นว่า ตัวเลขจะกลับไปเป็นศูนย์ทุกครั้งที่เรากดปุ่ม RE-ZERO เท่านี้ก็เรียบร้อยสำหรับการทำ RE-ZERO จากโปรแกรม ใครที่ติดตามบทความของผมลองทำ Auto RE-ZERO มาโชว์กันบ้างนะครับ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dwto2zMSlNLuela1sUnB_AmZ6w1c-C-6-nHXahuxqbUDiHCUqO6qRFFBW9v1E3dZuah4rtVBwrMj-ZWRI98-g&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/4796808817395435700/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/re-zero-weight-scale.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/4796808817395435700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/4796808817395435700'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/re-zero-weight-scale.html' title='MS Access VBA RE-ZERO Weight Scale : เซ็ทศูนย์ตาชั่งจากโปรแกรม'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV5Aj1Avt21C30wW3o0rnL_ZCpp72VEZkryrMFVh9ST6R_-X1gjzmqEpLgtWxuAOPrjvwpdhXRFnbQK0Pdh6vH7rN_nkqLVQuaZYE3w5ARlsbOwD6MWnlFQyBXDSm44VlJUZDZk4XZSGS2/s72-c/FormImprove.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-5112276899923650473</id><published>2012-01-13T21:34:00.000+07:00</published><updated>2012-01-24T10:01:12.828+07:00</updated><title type='text'>MS Access VBA Function ฺ: ตัดแต่งค่าที่ได้จากเครื่องชั่ง</title><content type='html'>ผมจะไม่ตั้งตัวแปรขึ้นมาเพิ่มเติม เพราะจะใช้ Text Box ชื่อ txtW แทนตัวแปร ไหนๆ ก็เสียหัว (Overhead) ให้กับ Text Box ไปแล้วในฟอร์ม ก็ไม่ยอมเสียหัวให้กับตัวแปรเพิ่มอีกใน VBA (ผมก็ว่าไปตามภาษาของโผ้ม) &amp;nbsp;จำได้กันไหมว่า Data Format จากเครื่องชั่งมีรูปแบบอย่างไร&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0b-WnB-T7qdDH5OtU2DKQMTDuTbksM-O8AqYJhQBQOJbOqOCl82NGI2MuoO_x0UHPUdBXGmpVO5GacF0yRg3UbIufddF5C-8HYKJpdCzLBAD9tgCnvMQ2bOw0erO7jNe_v59AZOGtJRuI/s1600/Manual4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;528&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0b-WnB-T7qdDH5OtU2DKQMTDuTbksM-O8AqYJhQBQOJbOqOCl82NGI2MuoO_x0UHPUdBXGmpVO5GacF0yRg3UbIufddF5C-8HYKJpdCzLBAD9tgCnvMQ2bOw0erO7jNe_v59AZOGtJRuI/s640/Manual4.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;b&gt;ต้นฉบับภาษาอังกฤษที่ผมพออ่านได้ มีดังนี้&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;b&gt;Left$(&lt;i&gt;string, length&lt;/i&gt;)&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Returns a substring containing a specified number of characters from the beginning (left side) of a string.
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Left$ function syntax has these parts:&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong&gt;&lt;i&gt;string&lt;/i&gt;&lt;/strong&gt;&amp;nbsp;Required. String expression from which the leftmost characters are returned.&lt;/div&gt;
&lt;div class=&quot;MsoBodyTextIndent3&quot; style=&quot;margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong&gt;&lt;i&gt;length&lt;/i&gt;&lt;/strong&gt;&amp;nbsp;Required; Long. Numeric expression indicating how many characters to return. If 0, a zero-length string (&quot;&quot;) is returned. If greater than or equal to the number of characters in string, the entire string is returned.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;b&gt;Mid$(&lt;i&gt;string, start[, length]&lt;/i&gt;)&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Returns a substring containing a specified number of characters from a string.
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Mid$ function syntax has these parts:&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong&gt;&lt;i&gt;string&lt;/i&gt;&lt;/strong&gt;&amp;nbsp;Required. String expression from which characters are returned.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-left: 0.5in; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: -0.5in;&quot;&gt;
&lt;strong&gt;&lt;i&gt;start&lt;/i&gt;&lt;/strong&gt;&amp;nbsp;Required; Long. Character position in string at which the part to be taken begins. If start is greater than the number of characters in string, Mid returns a zero-length string (&quot;&quot;).&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-left: 35.1pt; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: -35.1pt;&quot;&gt;
&lt;strong&gt;&lt;i&gt;length&amp;nbsp;&lt;/i&gt;&lt;/strong&gt;Optional; Long. Number of characters to return. If omitted or if there are fewer than length characters in the text (including the character at start), all characters from the start position to the end of the string are returned.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-left: 35.1pt; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: -35.1pt;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small; line-height: normal; text-indent: 0px;&quot;&gt;CR/LF means Carriage Return/Linefeed. ตอนนี้เราไม่สนใจตัวนี้ ถ้าใครเรียนพิมพ์ดีดมาก็จะค้นเคยดีว่าคืออะไร เอาเป็นว่าเหมือนกด Enter ประมาณนั้น เป็นอันเข้าใจว่าจบการส่งข้อมูลหนึ่งชุดที่เครื่องชั่งส่งมาให้ก็แล้วกัน&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #494949; font-family: Verdana, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 1.2em; margin-left: 35.1pt; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: -35.1pt;&quot;&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;สมมุติใน txtW ค่าคือ &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #f1c232; text-indent: -35.1pt;&quot;&gt;ST,+00012.40 &amp;nbsp;g&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Header = Left$(Me.txtW.Value, 2) = &quot;ST&quot;&lt;br /&gt;
Separator = Mid$(Me.txtW.value, 3, 1) = &quot;,&quot;&lt;br /&gt;
Data = Mid$(
Me.txtW.Value&amp;nbsp;, 4, 9) = &quot;+00012.40&quot;&lt;br /&gt;
Unit = Mid$(
Me.txtW.Value&amp;nbsp;, 13, 3) = &quot; &amp;nbsp;g&quot;&lt;br /&gt;
&lt;br /&gt;
Val(Data) = 12.4 อันนี้เอาไปบันทึกลงฐานข้อมูลได้เลย อ่านคำเตือนก่อนเน้อ&lt;br /&gt;
&lt;br /&gt;
คำเตือน สำหรับ Val() Function :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Many programmers use VB&#39;s Val() function to convert user inputted&lt;br /&gt;
strings into numbers. This useful function returns zero (0) for&lt;br /&gt;
strings that are meaningless as numeric input. Unfortunately, Val()&lt;br /&gt;
has a bug in its routines. Notably, Val(&quot;6%&quot;) returns 6, Val(&quot;6.%&quot;)&lt;br /&gt;
returns 6, Val(&quot;6.0%&quot;) returns 6, but Val(&quot;6.1%&quot;) generates a&lt;br /&gt;
Type Mismatch error! Hence, for a solid program, no cautious VB&lt;br /&gt;
programmer can use Val() as-is for generic inputs.&lt;br /&gt;
&lt;br /&gt;
To avoid this error, try a routine that replaces the offending&lt;br /&gt;
percentage sign with some other character, as in this:&lt;br /&gt;
&lt;br /&gt;
TheString = &quot;15.7%&quot;&lt;br /&gt;
Mid(TheString, Instr(TheString, &quot;%&quot;),1) = &quot;$&quot;&lt;br /&gt;
Debug.Print Val(TheString)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_aHIcqWLSriSXwAIOwRknADKlcDkUE_FBbE1oYg-l8pgQ50c0W2MmZwI8QaUPYxQUyZtuGnxufhEDLZYgW7YTeL3tBz7Z5G0qPLmX1amJeSuII_q2UZv7pDyVTad1Yyjky2LP8fIDm9tH/s1600/%25E0%25B8%2595%25E0%25B8%25B1%25E0%25B8%2594%25E0%25B9%2581%25E0%25B8%2595%25E0%25B9%2588%25E0%25B8%2587%25E0%25B8%2584%25E0%25B9%2588%25E0%25B8%25B21.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_aHIcqWLSriSXwAIOwRknADKlcDkUE_FBbE1oYg-l8pgQ50c0W2MmZwI8QaUPYxQUyZtuGnxufhEDLZYgW7YTeL3tBz7Z5G0qPLmX1amJeSuII_q2UZv7pDyVTad1Yyjky2LP8fIDm9tH/s640/%25E0%25B8%2595%25E0%25B8%25B1%25E0%25B8%2594%25E0%25B9%2581%25E0%25B8%2595%25E0%25B9%2588%25E0%25B8%2587%25E0%25B8%2584%25E0%25B9%2588%25E0%25B8%25B21.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
ใครที่เอาไปประยุกต์ใช้ได้ผลอย่างไร มาแบ่งปันประสบการณ์กันบ้างนะครับ วันนี้พอก่อนล่ะ</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/5112276899923650473/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/vba-function.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/5112276899923650473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/5112276899923650473'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/vba-function.html' title='MS Access VBA Function ฺ: ตัดแต่งค่าที่ได้จากเครื่องชั่ง'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0b-WnB-T7qdDH5OtU2DKQMTDuTbksM-O8AqYJhQBQOJbOqOCl82NGI2MuoO_x0UHPUdBXGmpVO5GacF0yRg3UbIufddF5C-8HYKJpdCzLBAD9tgCnvMQ2bOw0erO7jNe_v59AZOGtJRuI/s72-c/Manual4.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-5801010507145861764</id><published>2012-01-13T13:34:00.000+07:00</published><updated>2012-01-13T13:34:02.095+07:00</updated><title type='text'>MS Access จะวาดลวดลายแทน VB ด้วย VBA : เขียน code รับข้อมูลจากตาชั่ง</title><content type='html'>่ก่อนอื่นต้องลงตัวนี้ก่อน XMCommCRC ActiveX ใ้ห้เรียบร้อยก่อนนะครับ ต่อจากนั้นเปิด Access สร้างฟอร์มขึ้นมา ใช้คำสั่ง Insert &amp;gt; ActiveX Control ให้เลือกตามผมแล้วตอบ OK&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZKareY1o0XG3QsL0rzrRoaLBV7Ycn3hphJXF9i-YH5uzOFynmuq_Zn2witdszP2YKr1tyCpOCzDM4Z1-bJlIlxZAVeLYyYCZtMQ2D8JUtsyAddod6C3q24kNYEVohKy5TkMMF4Xt0Cozf/s1600/AccessVBA.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;458&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZKareY1o0XG3QsL0rzrRoaLBV7Ycn3hphJXF9i-YH5uzOFynmuq_Zn2witdszP2YKr1tyCpOCzDM4Z1-bJlIlxZAVeLYyYCZtMQ2D8JUtsyAddod6C3q24kNYEVohKy5TkMMF4Xt0Cozf/s640/AccessVBA.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
คลิกที่ตัว Control, คลิกที่ผมวงกลมไว้ จะได้หน้าต่าง Properties, คลิก Tab = All คุณสมบัติของ Control แสดงขึ้นมาดังรูปข้างล่าง&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX57WzG11_WQ1C6XZUATTEnSTTlzzaYoZgxRO3OtuIBSaTdkz6jx30awENNP6t6kQj3REuPSTSGJq2RJZ3CR1dvbAxcdvFvomr3QdgZzQFnnq8QeXDlVyCauBB2f54aRSshpHFqaNnDIZh/s1600/AccessVBA2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;460&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX57WzG11_WQ1C6XZUATTEnSTTlzzaYoZgxRO3OtuIBSaTdkz6jx30awENNP6t6kQj3REuPSTSGJq2RJZ3CR1dvbAxcdvFvomr3QdgZzQFnnq8QeXDlVyCauBB2f54aRSshpHFqaNnDIZh/s640/AccessVBA2.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
เจาะประเด็น XMCommCRC ActiveX ดูรูปด้านล่าง&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglfDs7K7oR3W8edv-LcH10TMvTzO-CPt0jhguvfHTcZGcJiJW59f5Ynzxw4stKudxl_ZBjMipV1fJ0UxSsuMWiBp-176kHGBw7yIErm1og8xQEAP-3Cy7UL1dIAhcDzAxGp5Tb0xwlDW5M/s1600/AccessControlProperties.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglfDs7K7oR3W8edv-LcH10TMvTzO-CPt0jhguvfHTcZGcJiJW59f5Ynzxw4stKudxl_ZBjMipV1fJ0UxSsuMWiBp-176kHGBw7yIErm1og8xQEAP-3Cy7UL1dIAhcDzAxGp5Tb0xwlDW5M/s640/AccessControlProperties.JPG&quot; width=&quot;398&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Name = XMCommCRC1 เอาไปใช้อ้างอิงในการเขียนโค้ดของเรา&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CommPort = 1 ขึ้นอยู่กับพอร์ตที่ใช้ต่อกับเครื่องชั่ง ในที่นี้ผมต่อเข้าพอร์ต 1 ก็กำหนดเป็น 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RThreshold = 17 คุ้นๆ นะ มาได้ยังไงเนี่ย ย้อนไปดูบทความที่ผ่านมานะครับ&lt;br /&gt;
RTSEnable = Yes ใช้คู่กันตัวข้างบน&lt;br /&gt;
Settings = 2400, E, 7, 1 ตั้งค่าพอร์ตให้ตรงกับเครื่องชั่ง&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65lL3uf6mPT-5Fmpe40w410mjUyTZXjXG19E-ez5Tjnbn1tNR8hK9ajqXXu3HNe1QCea2GoH3w94qSgvAEchMynxYmhivt717c3mVi23JFTJXXpqyvyB6Ym7eiIg5m9h2ILtjalQgw0fD/s1600/AccessControlProperties1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;450&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65lL3uf6mPT-5Fmpe40w410mjUyTZXjXG19E-ez5Tjnbn1tNR8hK9ajqXXu3HNe1QCea2GoH3w94qSgvAEchMynxYmhivt717c3mVi23JFTJXXpqyvyB6Ym7eiIg5m9h2ILtjalQgw0fD/s640/AccessControlProperties1.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
สร้าง Text Box ขึ้นมาอีก 1 อัน เอาไว้สำหรับแสดงค่าน้ำหนักที่รับมาจากตาชั่ง ผมตั้งชื่อ txtW&lt;br /&gt;
ต่อไปก็จะเข้าไปเขียน Code ใน VBA&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0DEThiCJ88MVI18N_dlQFhw7fr21poyC87_97-vvzd_TXbV8-ZxZEpDROkz6PrdBzcIwmSclxDAfWI5hU3qJKeFv5TweuPkWdehPDUp48LQ6u0PMmXqvqI-oYuFwJf1_6nMLzF3RDWJI5/s1600/CodeVBA.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;416&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0DEThiCJ88MVI18N_dlQFhw7fr21poyC87_97-vvzd_TXbV8-ZxZEpDROkz6PrdBzcIwmSclxDAfWI5hU3qJKeFv5TweuPkWdehPDUp48LQ6u0PMmXqvqI-oYuFwJf1_6nMLzF3RDWJI5/s640/CodeVBA.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
ทดลอง Run Form ที่สร้างไว้ เพื่อทดลองดูซิว่าด้วยโค้ดสั้นๆ ง่ายๆ แบบนี้ผลจะเป็นอย่างไร&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA3ga9JuY6UoxenLZjW51TcHpFcfGr7aZi8FxwQfl_1s9AY9LXhm4upQca9e7x6LLWoiHnjQ_KmV2Ym2695VZA1WIXS_pY34OUDZUr0KLFNqQsigKedFzK62APFNru5fEBjNTge5NP4sgv/s1600/AccessTestRun.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;460&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA3ga9JuY6UoxenLZjW51TcHpFcfGr7aZi8FxwQfl_1s9AY9LXhm4upQca9e7x6LLWoiHnjQ_KmV2Ym2695VZA1WIXS_pY34OUDZUr0KLFNqQsigKedFzK62APFNru5fEBjNTge5NP4sgv/s640/AccessTestRun.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
ทดลองชั่ง แม่จ้าวเว้ย อะไรมันจะง่ายปานนั้น ถ้าไม่มีอะไรผิดพลาด ก็น่าใจมีอะไรให้เห็นบ้างที่ Text Box&lt;br /&gt;
แต่จะเห็นเป็นอย่างไรก็ขึ้นอยู่กับการตั้งค่าในโหมด PRT ล่ะครับ&lt;br /&gt;
&lt;br /&gt;
คราวหน้าผมจะลองตัดแต่งค่าที่ตาชั่งส่งมาเพื่อนำไปใช้ประโยชน์ เก็บลงในฐานข้อมูล นำข้อมูลไปเขียนกราฟ หรือทำ SPC แบบบ้านๆ กันซะเลย, การสั่ง RE-ZERO จากโปรแกรม, แนวคิดการทำ Auto - ZERO เช่นเดียวกับเครื่องชั่งราคาแพง</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/5801010507145861764/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/ms-access-vb-vba-code.html#comment-form' title='7 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/5801010507145861764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/5801010507145861764'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/ms-access-vb-vba-code.html' title='MS Access จะวาดลวดลายแทน VB ด้วย VBA : เขียน code รับข้อมูลจากตาชั่ง'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZKareY1o0XG3QsL0rzrRoaLBV7Ycn3hphJXF9i-YH5uzOFynmuq_Zn2witdszP2YKr1tyCpOCzDM4Z1-bJlIlxZAVeLYyYCZtMQ2D8JUtsyAddod6C3q24kNYEVohKy5TkMMF4Xt0Cozf/s72-c/AccessVBA.JPG" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-1452006641507244049</id><published>2012-01-12T09:26:00.002+07:00</published><updated>2012-01-24T10:02:25.913+07:00</updated><title type='text'>Weight Balance : อ่านคู่มือกันก่อนดีกว่ามั๊ย : A&amp;D EK-i Balance series Scale</title><content type='html'>&lt;a href=&quot;http://www.aandd.jp/products/manual/balances/ekw-i.pdf&quot;&gt;A&amp;amp;D EK-i Series Manual&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ต้องบอกก่อนว่าผมไม่ได้เป็น Sale ขายเครื่องชั่งนะครับ ไม่ได้เชียร์ยี่ใดทั้งนั้น เพียงแต่มีโอกาสสัมผัสยี่ห้อนี้ก็เลยยกตัวอย่างที่ยี่ห้อนี้ ส่วนยี่ห้ออื่นๆ ผมไม่มีโอกาสจับก็ไม่รู้จะนำมาเสนอได้อย่างไร หากสนใจจะนำมาให้ทดลองก็ยินดี ก็แจ้งความจำนงกันมาได้&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.aandd.jp/img/products/weighing/balance/compact/ek_ew-i.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://www.aandd.jp/img/products/weighing/balance/compact/ek_ew-i.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
เปิดคู่มือไปดูที่หน้า 20 Function list จุดสนใจแรกคือ Prt : Data output mode&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd1hPWehY7Zag_VVV5AOY_1viCExGfzna1AJ-DTRkRqlZSgnxq4RA5snBSnp1Ur_4LIRwMYHLFGvUXgtf99xCrORWuXGmfe2abhuV2lN6FZLSGclYi6JXj7rW2yRw8dYQF0jegTTqFOG02/s1600/Manual1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;470&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd1hPWehY7Zag_VVV5AOY_1viCExGfzna1AJ-DTRkRqlZSgnxq4RA5snBSnp1Ur_4LIRwMYHLFGvUXgtf99xCrORWuXGmfe2abhuV2lN6FZLSGclYi6JXj7rW2yRw8dYQF0jegTTqFOG02/s640/Manual1.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
มีอยู่ 5 Modes ด้วยกัน ค่าเริ่มต้นจากโรงงานคือ 1 - Command and PRINT key เราสามารถส่งคำสั่งจากเครื่องคอมพิวเตอร์มาสั่งเครื่องชั่งได้ ตัวอย่างเช่น การเซ็ต 0, การขอรับค่าจากเครื่องชั่ง, เป็นต้น และเครื่องชั่งจะส่งค่าออกไปภายนอก เมื่อเรากดปุ่ม PRINT ที่เครื่องชั่ง เรียกว่า ส่งค่าออกแบบ Manual ว่างั้นเถอะ&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Prt 0 : รับคำสั่งได้และส่งค่าออกมาต่อเนื่อง ประมาณ 10 ครั้งต่อวินาที&lt;/li&gt;
&lt;li&gt;Prt 1 : รับคำสั่งได้และส่งค่าออกมาเมื่อกดปุ่ม PRINT&lt;/li&gt;
&lt;li&gt;Prt 2 : รับคำสั่งได้และส่งค่าออกมาโดยอัตโนมัติเฉพาะค่าบวก เมื่อเครื่องชั่งอยู่ในสถานะ Stable&lt;/li&gt;
&lt;li&gt;Prt 3 : รับคำสั่งได้และส่งค่าออกมาโดยอัตโนมัติทั้งค่าบวกและลบ เมื่อเครื่องชั่งอยู่ในสถานะ Stable&lt;/li&gt;
&lt;li&gt;Prt 4 : รับคำสั่งและส่งค่าตามคำสั่งเท่านั้น&lt;/li&gt;
&lt;/ul&gt;
ที่ผมใช้บ่อยๆ คือ Prt 2 แล้วก็ Prt 0 ส่วนวิธี Set ดูในคู่มือเพิ่มเติมกันเองนะครับ แต่ละยี่ห้อคงไม่ต่างกันมาก น่าจะแนวๆ เดียวกัน&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
จุดที่สองคือ bPS : Baud rate ค่าเริ่มต้นจากโรงงานคือ 2400 bps ผมไม่เปลี่ยนค่าใดๆ ที่ตรงนี้ทั้งสิ้น แล้วก็อธิบายไม่ถูกว่ามันคืออะไร&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ดูคู่มือหน้าต่อไป&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;จุดต่อไปคือ btPr : Data and parity ค่าเริ่มต้นของโรงงานคือ 0 = 7 bits, even parity ใช้ค่าเดิมๆ&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqvqx5pQW12TveP_B8TGckWCPaMhUxRF1wWXUkSHhqgV12ZnZCEu8YyfzAkU9Lthem2BghYGxiqMk7Z1myg__wA8CUBKM2YF8DZA5QmWuXYJuqzMXOE5xGTKPm7mh_qTao9UIFPHvHvLZf/s1600/Manual2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;496&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqvqx5pQW12TveP_B8TGckWCPaMhUxRF1wWXUkSHhqgV12ZnZCEu8YyfzAkU9Lthem2BghYGxiqMk7Z1myg__wA8CUBKM2YF8DZA5QmWuXYJuqzMXOE5xGTKPm7mh_qTao9UIFPHvHvLZf/s640/Manual2.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
จุดสนใจอีกจุดที่ต้องดูคือ Stop bit: 1 bit&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia4Y9yXGT9F3B5LmvbNo3iN9v5YyZ8INkcMoGvrRraPk9GsMKs2gyHbPudt_zbSG9UwlirCbMoezeUgceU56S6gczE9wJuf-O_I1VzYaD789O6_yYKGcqTUtcSHVb8LBA_HBLAQ7MDyA3R/s1600/Manual3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;528&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia4Y9yXGT9F3B5LmvbNo3iN9v5YyZ8INkcMoGvrRraPk9GsMKs2gyHbPudt_zbSG9UwlirCbMoezeUgceU56S6gczE9wJuf-O_I1VzYaD789O6_yYKGcqTUtcSHVb8LBA_HBLAQ7MDyA3R/s640/Manual3.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
และต่อด้วยสุดท้าย รูปแบบข้อมูลที่ส่งออกมาจากตาชั่ง ใครที่ติดตามตอน HyperTerminal ก็เริ่มจะร้องอ๋อ !! แล้วใช่ไหมครับ คุ้นๆ นะ &lt;span style=&quot;color: red;&quot;&gt;&lt;b style=&quot;text-decoration: underline;&quot;&gt;ลองนับดูสิครับว่า ข้อมูล 1 ชุดมีกี่อักษระ&lt;/b&gt;&amp;nbsp;&lt;/span&gt;เราจะใช้ส่วนนี้อีกครั้งตอนเขียนโปรแกรมรับค่าใน VBA. ของ MS Access และแยกเอาข้อมูลต้องการไปใช้&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTwWR0D2dfZIeu97zwZbp0MoODfBe8JTy48xJeNtrZhysZYZR7oQF-4unxZ3pkekhJbERBcl9r41qoUlfc5IwXpI99KnlZ8H7K9TeRQMI-OnSeON2rUcJ-_Wm9RFvXFFqp2XBEFtt4w4xH/s1600/Manual4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;528&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTwWR0D2dfZIeu97zwZbp0MoODfBe8JTy48xJeNtrZhysZYZR7oQF-4unxZ3pkekhJbERBcl9r41qoUlfc5IwXpI99KnlZ8H7K9TeRQMI-OnSeON2rUcJ-_Wm9RFvXFFqp2XBEFtt4w4xH/s640/Manual4.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
คราวนี้ใครที่ครั้งก่อนหน้านี้ ตอนทดสอบด้วย HyperTerminal ค่าไม่เหมือนกับ Data Format ลองกลับไปตั้งค่า ให้ถูกต้องก่อนนะครับ แล้วน่าจะประสบความสำเร็จในขั้นตอนนี้กันทุกคน หากใครมีข้อสงสัยหรือ Comment ก็ post ไว้นะครับ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
สรุปค่าต่างที่ใช้ตั้งค่าพอร์ตคือ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ฺ&lt;span style=&quot;background-color: #6aa84f;&quot;&gt;Baud rate : 2400 bps&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: #6aa84f;&quot;&gt;Data and parity : 7 bits, even parity (E)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: #6aa84f;&quot;&gt;Stop bits : 1 bits&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: #6aa84f;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: #6aa84f;&quot;&gt;Data Format : จำนวนอักษระ 17 ตัวอักษร&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: #6aa84f;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
คราวหน้าจะเข้าสู่ Access and VBA และ ActiveX ที่เราจะใช้ใน Project นี้กัน&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/1452006641507244049/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/and-ek-i-balance-series-scale.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/1452006641507244049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/1452006641507244049'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/and-ek-i-balance-series-scale.html' title='Weight Balance : อ่านคู่มือกันก่อนดีกว่ามั๊ย : A&amp;D EK-i Balance series Scale'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd1hPWehY7Zag_VVV5AOY_1viCExGfzna1AJ-DTRkRqlZSgnxq4RA5snBSnp1Ur_4LIRwMYHLFGvUXgtf99xCrORWuXGmfe2abhuV2lN6FZLSGclYi6JXj7rW2yRw8dYQF0jegTTqFOG02/s72-c/Manual1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-7412663905240280839</id><published>2012-01-11T23:28:00.001+07:00</published><updated>2012-01-24T10:00:40.463+07:00</updated><title type='text'>RS232 Communication Test by Hyperterminal : ตรวจสอบการสื่อสารด้วย Hyperterminal</title><content type='html'>ก่อนจะเขียนโปรแกรมรับค่าด้วย Microsoft Access ผมจะลองใช้โปรแกรมที่มาพร้อมกับ Windows เพื่อตรวจสอบว่ามีข้อมูลส่งมาจากตาชั่งเข้ามายังเครื่องคอมพิวเตอร์ของเราหรือไม่ โดยต่อสายต่างๆ ให้เรียบร้อย เช่น RS232, พาวเวอร์ตาชั่ง, เปิดตาชั่งให้เรียบร้อย เข้าไปที่ Start &amp;gt; Programs &amp;gt; Accessories &amp;gt; Communication &amp;gt; HyperTerminal&lt;br /&gt;
HyperTerminal ก็จะเปิดขึ้นมา หน้าแรกก็เป็นดังรูปข้างล่าง&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVlcOyo6fGts82KKnK2dQCL-qOb1yRy2zkUg-HIqRNb0cdi8GIBXW3j4oxNsnpT1IHnb87cWQPkbKgboPlzt8RqcE44EfZH72uew1AHDP8Oj3H2KrhUIgcDW1O4ioPS-PmlQp90O2JSN4k/s1600/Hyper1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVlcOyo6fGts82KKnK2dQCL-qOb1yRy2zkUg-HIqRNb0cdi8GIBXW3j4oxNsnpT1IHnb87cWQPkbKgboPlzt8RqcE44EfZH72uew1AHDP8Oj3H2KrhUIgcDW1O4ioPS-PmlQp90O2JSN4k/s640/Hyper1.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
ใส่ชื่อในช่อง Name: พอเป็นพิธี&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNYH0S4vOpU1SSAy1iDTOwHae3Z4WYbAB9epNl6PEdlcI_NWnOMUWR6QgtMkQsvJ-Ha8XJLgmaGwHb7_pWRnehcDCUirxg5ePrWoWlQqYJ6UBP2yRo9TKz420s7uoUrTgIaZEuyQkgD44R/s1600/Hyper2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNYH0S4vOpU1SSAy1iDTOwHae3Z4WYbAB9epNl6PEdlcI_NWnOMUWR6QgtMkQsvJ-Ha8XJLgmaGwHb7_pWRnehcDCUirxg5ePrWoWlQqYJ6UBP2yRo9TKz420s7uoUrTgIaZEuyQkgD44R/s640/Hyper2.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
เลือกพอร์ตที่เราเชื่อมต่อด้วย ในที่นี้ผมมีพอร์ตเดียวคือ COM1&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHn_6y2MrH1MO9u4C6pAgyNqJ0sEzW9qFGtUMKf4af5nFyVLadxYj_Pz1Lwjb_2OsP8E9fUnYA_5aH2fSifJZy4L5r00nY-EDz0Xyzya4yDFmupxbRBFC4310ZjqzBm03GHAy5EFfWwF_6/s1600/Hyper3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHn_6y2MrH1MO9u4C6pAgyNqJ0sEzW9qFGtUMKf4af5nFyVLadxYj_Pz1Lwjb_2OsP8E9fUnYA_5aH2fSifJZy4L5r00nY-EDz0Xyzya4yDFmupxbRBFC4310ZjqzBm03GHAy5EFfWwF_6/s640/Hyper3.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
ตรงนี้จะถูกถามจะตั้งค่าเป็นอย่างไรบ้าง ไม่สนใจ OK ทันที&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjReUIJcrqKKStCeMSb9XWCcVW4k-fmu79_MxEQHWdZumiHjmoIFvmHqxcTpxxcHrsWCKJys2Qz99Z6S6zoUwTGpHHnSOtJvK9vbrTHiYFMwxXk2MRuWcmVnjr9vJ8xX7lW2nKYL0qrftKm/s1600/Hyper4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjReUIJcrqKKStCeMSb9XWCcVW4k-fmu79_MxEQHWdZumiHjmoIFvmHqxcTpxxcHrsWCKJys2Qz99Z6S6zoUwTGpHHnSOtJvK9vbrTHiYFMwxXk2MRuWcmVnjr9vJ8xX7lW2nKYL0qrftKm/s640/Hyper4.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
ก็จะได้หน้าจอว่าง ๆ ดังรูปข้างล่าง&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjppk7P4jlej1LN6-emxZDjnYJIl4GnJTlCVCM4NO2vQOBVuGVTIrkTp1wYu60bfC8vL_xTmhrcQ1ar-Lsukpjkj6h_n4BVdBGXr5RUl87-pVWPTHh50PyIKlVAul7jKT_hogv10xwwWVWT/s1600/Hyper5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjppk7P4jlej1LN6-emxZDjnYJIl4GnJTlCVCM4NO2vQOBVuGVTIrkTp1wYu60bfC8vL_xTmhrcQ1ar-Lsukpjkj6h_n4BVdBGXr5RUl87-pVWPTHh50PyIKlVAul7jKT_hogv10xwwWVWT/s640/Hyper5.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
ทดลองเอาอะไรวางที่ตาชั่ง รอดูซิว่ามีอะไรโผล่มาในจอบ้าง ถ้าออกมาอย่างนี้เลยก็สบายล่ะ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHoU7OH3mYXXrDZrkXbzFnwaA2PbXbF8ahc1SxUOF-BW0HYp1L2zv9cWI8aT1NcVJP3bFdADAiTIc-LdL84KCf9HIUHUuEri9Iq-sqq-tZ8xlwMXlZdhCEbMjErRhdQfWr81OaOX2QQto1/s1600/Hyper6.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHoU7OH3mYXXrDZrkXbzFnwaA2PbXbF8ahc1SxUOF-BW0HYp1L2zv9cWI8aT1NcVJP3bFdADAiTIc-LdL84KCf9HIUHUuEri9Iq-sqq-tZ8xlwMXlZdhCEbMjErRhdQfWr81OaOX2QQto1/s640/Hyper6.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
ที่ด้านล่างหน้าจอของโปรแกรม HyperTerminal สังเกตุช่องที่สาม 2400 7-E-1 จดใส่กระดาษเอาไว้เลย เราจะเอา Code นี้ไปใช้ในภายหลัง&lt;br /&gt;
&lt;br /&gt;
แต่ถ้าไม่ปรากฎ อะไรขึ้นมาเลย อย่าเพิ่งตกใจ อย่าเพิ่งจดอะไรใส่กระดาษไว้ เราอาจตั้งคุณสมบัติของพอร์ตยังไม่ถูกต้อง หรือยังตั้ง Option ที่ตัวเครื่องชั่งไม่เหมาะสมก็ได้ เสียเวลานิดหน่อย ลงทุนอ่านคู่มือเครื่องชั่งที่เราเอามาใช้งานกันก่อนดีมั๊ย จะได้แก้ไขปัญหาไปทีละประเด็น</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/7412663905240280839/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/communication-test-by-hyperterminal.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/7412663905240280839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/7412663905240280839'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/communication-test-by-hyperterminal.html' title='RS232 Communication Test by Hyperterminal : ตรวจสอบการสื่อสารด้วย Hyperterminal'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVlcOyo6fGts82KKnK2dQCL-qOb1yRy2zkUg-HIqRNb0cdi8GIBXW3j4oxNsnpT1IHnb87cWQPkbKgboPlzt8RqcE44EfZH72uew1AHDP8Oj3H2KrhUIgcDW1O4ioPS-PmlQp90O2JSN4k/s72-c/Hyper1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1714354472473991136.post-2634221536239250572</id><published>2012-01-11T16:02:00.000+07:00</published><updated>2012-01-24T10:00:06.615+07:00</updated><title type='text'>MS Access VBA เขียนโปรแกรมติดต่อกับเครื่องชั่งผ่านพอร์ตสื่อสาร RS232 serial port : บทนำ</title><content type='html'>&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; เรื่องที่จะถ่ายทอดประสบการณ์ในครั้งนี้ เป็นการเขียนโปรแกรมเพื่อติดต่อกับเครื่องชั่งน้ำหนักทางพอร์ตสื่อสาร RS232 โดยผมผู้ถ่ายทอดคือ User ที่มิได้ร่ำเรียนคอมพิวเตอร์มาโดยตรง อาศัยคุณลุงกู (เกิล) แล้วก็เว็บไซต์ทั้งในและนอกประเทศที่เสนอความรู้ เอาไว้ให้ได้ศึกษา (เอาไว้วันหลังผมจะนำลิงค์เพิ่มเติมให้) ดังนั้นจึงเป็นการถ่ายทอดประสบการณ์จาก User สู่ User โดยผมใช้ Microsoft Access ซึ่งมีอยู่แล้ว (ย้ำว่ามีอยู่แล้ว ไม่ต้องซื้อเพิ่ม) ในชุดไมโครซอฟออฟฟิต เชื่อว่ามีอยู่ทุกเครื่องในสำนักงานของท่าน ถูกลิขสิทธิ์ ถูกกฎหมาย 100% เพียงแค่หาอะไรมาเพิ่มเติมอีกเล็กน้อย ไม่ต้องพึ่ง&amp;nbsp;MSComm Control ที่มากับ Visual Basic 6 เวอร์ชั่น&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;Professional และ Enterprise&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;ใช้ของฟรี อย่างเช่นที่ผมใช้คือ&amp;nbsp;&lt;a href=&quot;http://www.mvps.org/rgrier/XMCommCRC.ZIP&quot;&gt;XMCommCRC&lt;/a&gt;&amp;nbsp;สามารถดาวน์โหลดมาใช้ได้ฟรี และถ้าไม่ต้องการให้มี Pop up window ให้มากวนใจก็จ่ายค่าสินสอด ในราคาไม่แพงเพียง 10US ก็จะได้น้องนางมาครองดังใจ ดูเนียนๆ เป็นมืออาชีพเข้าไปอีก แต่อย่างไรซะประสบการณ์ตรงนี้ คงไม่เหมาะกับมือ Office ใหม่ๆ อย่างแน่นอน ก่อนอื่น ผมขอพาชมอุปกรณ์ที่ผมใช้ในโปรเจคนี้กันก่อน&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;ตาชั่ง AND EK-3000i ดูราคาในเว็บประมาณ 14,000 บาท เครื่องยี่ห้ออื่นๆ ก็ใช้ได้ขอให้สามารถสื่อสารกันทาง RS232 ได้&lt;/li&gt;
&lt;li&gt;สายต่อ RS232 ต่อระหว่างเครื่องคอมพ์กับตาชั่ง&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mvps.org/rgrier/XMCommCRC.ZIP&quot;&gt;XMCommCRC&lt;/a&gt;&amp;nbsp;ดาวน์โหลดมาเตรียมไว้&lt;/li&gt;
&lt;li&gt;MS Access + VBA Knowledge พอได้ค่าน้ำหนักจากเครื่องชั่งมา ใครจะเอาไปต้มยำทำแกงอะไรต่อใน Access ก็สะดวกโยธิน&lt;/li&gt;
&lt;li&gt;Computer ที่มี Serial Port ถ้าใครใช้ Note book แล้วไม่มีพอร์ตก็คงต้องพึ่ง USB to Serial Converter ช่วยก็ใช้ได้ (ผมก็ใช้อย่างหลังนี่แหละ เดี่ยวนี้ไม่ค่อยมีใครใช้เครื่องตั้งโต๊ะกันแล้วนี่)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;/ul&gt;
ดาวน์โหลด&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.mvps.org/rgrier/XMCommCRC.ZIP&quot;&gt;XMCommCRC&lt;/a&gt;&amp;nbsp;&amp;nbsp;ตามลิงค์ ติดตั้งให้เรียบร้อย ใจเย็นๆ ก่อนนะครับ เดี๋ยวตอนหน้า ผมจะมาต่อโดยเริ่มกันตั้งแต่พื้นฐาน คือการตรวจสอบด้วย&amp;nbsp;Hyper terminal&amp;nbsp;ของวินโดว์ว่ามีสัญญาณมาจากเครื่องชั่งแล้วหรือยัง ต่อด้วยการศึกษาคู่มือเครื่องชั่ง ซึ่งจะนำไปสู่การตั้งค่าพอร์ตที่ถูกต้อง&amp;nbsp;สุดท้ายเราก็จะเขียนโปรแกรมรับค่าได้อย่างง่ายดาย ไม่สับสน อาการประมาณว่า &quot;จับต้นชนปลายไม่ถูก&quot; จะไม่เกิดขึ้น ถ้าใจเย็นๆ ผมรับประกันว่า จบบทความนี้คุณทำแบบผมได้อย่างแน่นอน ตาม Concept : Low Cost Programming&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0zVReN1ySR0YJvZ5QMs5TAaZmi1Yf5GLCbIkL43pPWMsWJIwHk6uXYMYsen9c-LIGew_xFeWobUnXTmLgj9T73TZ8tH20gwGKLNywHuEQqGeTm0umh-038t-WDRYKcub1lJMOHeKSx0G/s1600/%25E0%25B8%2595%25E0%25B8%25B2%25E0%25B8%258A%25E0%25B8%25B1%25E0%25B9%2588%25E0%25B8%25871.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0zVReN1ySR0YJvZ5QMs5TAaZmi1Yf5GLCbIkL43pPWMsWJIwHk6uXYMYsen9c-LIGew_xFeWobUnXTmLgj9T73TZ8tH20gwGKLNywHuEQqGeTm0umh-038t-WDRYKcub1lJMOHeKSx0G/s1600/%25E0%25B8%2595%25E0%25B8%25B2%25E0%25B8%258A%25E0%25B8%25B1%25E0%25B9%2588%25E0%25B8%25871.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnxzzX-816uM0DR-LLsyC1Z4WRVxMkqgT3l2iOjJPrjBeL2UnpD8AD7V8jwpbZ6h2oqiOgnlaw6U-0RBOH6mT0QIIxL_J9V2lJLcYmuzm6cKAu5oCYLetDV75msRFg20T9rXG13rZzvx29/s1600/%25E0%25B8%2595%25E0%25B8%25B2%25E0%25B8%258A%25E0%25B8%25B1%25E0%25B9%2588%25E0%25B8%25872.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnxzzX-816uM0DR-LLsyC1Z4WRVxMkqgT3l2iOjJPrjBeL2UnpD8AD7V8jwpbZ6h2oqiOgnlaw6U-0RBOH6mT0QIIxL_J9V2lJLcYmuzm6cKAu5oCYLetDV75msRFg20T9rXG13rZzvx29/s1600/%25E0%25B8%2595%25E0%25B8%25B2%25E0%25B8%258A%25E0%25B8%25B1%25E0%25B9%2588%25E0%25B8%25872.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dwQT0im3d7YIV8Z7xLel2ghXjjKgKvq5Rn_SpMbDPr78Vw7I93RmNx6PfocseLO7DvQL1_JzVGL84LOKYIh9g&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ohohardwareandsoftware.blogspot.com/feeds/2634221536239250572/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/rs232.html#comment-form' title='4 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/2634221536239250572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1714354472473991136/posts/default/2634221536239250572'/><link rel='alternate' type='text/html' href='http://ohohardwareandsoftware.blogspot.com/2012/01/rs232.html' title='MS Access VBA เขียนโปรแกรมติดต่อกับเครื่องชั่งผ่านพอร์ตสื่อสาร RS232 serial port : บทนำ'/><author><name>Yuttana</name><uri>http://www.blogger.com/profile/16559716709618906668</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0zVReN1ySR0YJvZ5QMs5TAaZmi1Yf5GLCbIkL43pPWMsWJIwHk6uXYMYsen9c-LIGew_xFeWobUnXTmLgj9T73TZ8tH20gwGKLNywHuEQqGeTm0umh-038t-WDRYKcub1lJMOHeKSx0G/s72-c/%25E0%25B8%2595%25E0%25B8%25B2%25E0%25B8%258A%25E0%25B8%25B1%25E0%25B9%2588%25E0%25B8%25871.JPG" height="72" width="72"/><thr:total>4</thr:total></entry></feed>