<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Programmable Electronic Load - Java GUI Part 1: Basic Functionality</title><link>/technologies/test-and-measurement/b/blog/posts/programmable-electronic-load---java-gui-part-1-basic-functionality</link><description>I&amp;#39;m building a GUI for the electronic load we made here on element14 .The development will be in a few incremental steps.communication with the instrumentbasic GUI with a SCPI command line and results In the next iterations:add error loggingmake the LC</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Programmable Electronic Load - Java GUI Part 1: Basic Functionality</title><link>https://community.element14.com/technologies/test-and-measurement/b/blog/posts/programmable-electronic-load---java-gui-part-1-basic-functionality</link><pubDate>Sat, 06 Jul 2019 12:42:23 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b83d4663-0abe-44b2-a834-a3addcfed576</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The app now is usable:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span id="e270eaf7_78ea_4719_b07a_82d58945ac27"&gt;&lt;span&gt;[View:https://www.youtube.com/watch?v=RvEYq_lwDNo:1110:699]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;LCD display works. Shows mode, status, set value, measured current and voltage.&lt;/li&gt;&lt;li&gt;Input on/off button&lt;/li&gt;&lt;li&gt;Set constant current&lt;/li&gt;&lt;li&gt;Error logging. Button turns red and shows error count. Clicking the button retrieves the errors.&lt;br /&gt;Clicking the button when it&amp;#39;s green (0 errors waiting) clears the log&lt;/li&gt;&lt;li&gt;SCPI command inteface to second tab.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can see a bug in the resize logic. By accident I let the LCD screen resize vertically. It should be the Error Log that resizes. I&amp;#39;ve fixed that.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7402&amp;AppID=13&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable Electronic Load - Java GUI Part 1: Basic Functionality</title><link>https://community.element14.com/technologies/test-and-measurement/b/blog/posts/programmable-electronic-load---java-gui-part-1-basic-functionality</link><pubDate>Fri, 05 Jul 2019 20:24:32 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b83d4663-0abe-44b2-a834-a3addcfed576</guid><dc:creator>DAB</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Nice post.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The process looks straight forward.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7402&amp;AppID=13&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable Electronic Load - Java GUI Part 1: Basic Functionality</title><link>https://community.element14.com/technologies/test-and-measurement/b/blog/posts/programmable-electronic-load---java-gui-part-1-basic-functionality</link><pubDate>Fri, 05 Jul 2019 16:49:37 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b83d4663-0abe-44b2-a834-a3addcfed576</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I added synchronisation to the instrument request - rponse:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=java&amp;amp;text=++++private+void+jButtonSCPISendActionPerformed%28java.awt.event.ActionEvent+evt%29+%7B++++++++++++++++++++++++++++++++++++++++++++++++%0A++++++++String+s%3B%0A++++++++synchronized+%28instrument%29+%7B%0A++++++++++++instrument.write%28jTextFieldSCPICmd.getText%28%29+%2B+%27%5Cn%27%29%3B%0A++++++++++++s+%3D+instrument.read%28%29%3B%0A++++++++%7D%0A++++++++jTextFieldSCPIReply.setText%28s%29%3B%0A++++%7D+++++++++]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This avoids that there&amp;#39;s a command sent to the instrument while I haven&amp;#39;t finished reading the previous reply.&lt;/p&gt;&lt;p&gt;There&amp;#39;s room for improvement here, but this is the simplest way I could see this happening.&lt;/p&gt;&lt;p&gt;I think it &amp;#39;ll do for this application and prevents that I have to do puzzling with the reply. I know no new command will be sent before I have the chance to read the previous reply.&lt;/p&gt;&lt;p&gt;It&amp;#39;s my responsibility to optimise the time spent in a single conversation and keep out any logic that does not have anything to do with the interaction with the load....&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7402&amp;AppID=13&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable Electronic Load - Java GUI Part 1: Basic Functionality</title><link>https://community.element14.com/technologies/test-and-measurement/b/blog/posts/programmable-electronic-load---java-gui-part-1-basic-functionality</link><pubDate>Fri, 05 Jul 2019 14:50:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b83d4663-0abe-44b2-a834-a3addcfed576</guid><dc:creator>ralphjy</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice clean interface.&amp;nbsp; A couple of thoughts - It might be useful if the log window would display command and response history in addition to errors and have a scrollbar to peruse it.&amp;nbsp; And it would be nice if the command entry box had a pulldown to enable repeating a previous command.&amp;nbsp; Haven&amp;#39;t used Swing.&amp;nbsp; It&amp;#39;s great that it is a cross platform implementation.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7402&amp;AppID=13&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable Electronic Load - Java GUI Part 1: Basic Functionality</title><link>https://community.element14.com/technologies/test-and-measurement/b/blog/posts/programmable-electronic-load---java-gui-part-1-basic-functionality</link><pubDate>Fri, 05 Jul 2019 14:47:03 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b83d4663-0abe-44b2-a834-a3addcfed576</guid><dc:creator>genebren</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Jan,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The interface is looking pretty cool.&amp;nbsp; I really like how your windows resize so nicely.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Keep up the good work!&lt;/p&gt;&lt;p&gt;Gene&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7402&amp;AppID=13&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>