完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,这将是一篇很长的详细帖子,所以我提前道歉。
我一直致力于一项计划,我计划用它来测试我们生产的电力变压器的电流比。 我正在做什么测量输入到单元的一个绕组中的电流,然后测量从另一个绕组流出的电流。 然后比较这两个数字并开发电流比。 我现在附上了程序的屏幕抓取(MainProgram.png)。 我将它设置为我的员工可以使用运行时(MainRuntime)的地方,以避免他们意外搞乱程序。 运行测试的方式是测试仪打开运行时文件,将变换器放在测试夹具上,然后点击“开始测试”,测试运行一次。 之后,他们在夹具上放置了一个不同的变压器并点击“重新测试”并测试新的变压器。 他们这样做,直到他们完成所有单位的测试,然后点击“退出测试”,一切都结束了。 它现在完美无瑕。 我的问题是关于设置程序,以便记录输入电流,电流比和通过/失败。 我一直在做很多阅读和实验,但我并没有真正得到我想要的地方。 我设置了图片中显示的文件(ExcelFile.png)。 我正在尝试做的是打开一个excel文件,创建一个新的工作表,将该工作表命名为当前日期,记录数据然后保存/关闭excel。 以下是我的问题:当数据流进入“文件名选择”框时,我必须手动选择文件,然后确认我要覆盖该文件。 有没有办法将它设置到用户此时没有输入的位置? 如何将“now()”框的格式更改为标准mm / dd / yy格式? 但实际的时间并不是很重要。 一旦我让这个小程序正常运行,如果我需要帮助将我学到的东西应用到实际的测试程序中,我会回来。 感谢您的关注,我感谢您的时间和对我的任何建议。 Nick MainRuntime.PNG9.5 KBExcelFile.PNG26.5 KB 以上来自于谷歌翻译 以下为原文 Hello again everyone, this is going to be a long detailed post so I apologize ahead of time. I've been working on a program that I plan to use to test the current ratio of electrical transformers that we produce. What I’m doing it measuring the current inputted into one winding of the unit and then measuring the current that comes out the other winding. Then those 2 numbers are compared and a Current Ratio is developed. I have attached a screen grab (MainProgram.png) of the program as it sits right now. I have it set up to where my employees can use the runtime (MainRuntime) in order to avoid them accidentally messing up the program. The way the testing is run the tester opens the runtime file, places a transformer onto the testing fixture, they then hit "Begin Testing" and the test runs once. After that, they put a different transformer on the fixture and hit "Re-Test" and the new transformer is tested. They do this until they have finished testing all the units and then hit "Exit Testing" and everything closes out. It works flawlessly right now. My questions are about setting up the program so it records the Input Current, Current Ratio and the Pass/Fail. I've been doing a lot of reading and experimenting and I’m not really getting where I want to yet. I set up the file shown in the picture (ExcelFile.png). What I’m TRYING to do is to open an excel file, create a new work sheet, name that sheet the current date, record the data and then save/close excel. Here are my questions: When the data flow gets to the "File Name Selection" box I have to manually pick the file and then confirm that I want to overwrite the file. Is there any way to set it up to where the user has no input at this point? How do I change the format of the "now()" box to a standard mm/dd/yy format? The actual time of day is not very important though. Once I get this little program running properly then I’ll come back if I need help applying what I’ve learned to the actual testing program. Thanks for looking, I appreciate the time and any advice you have for me. Nick 附件
|
|
相关推荐
4个回答
|
|
嗨尼克,我会尝试回答你的问题...让你的程序打开一个空白的excel文件,用数据填充它,然后使用Save Workbook As将它保存在一个新的文件名下,而不是使用文件名选择。
要更改now()的输出,请将其提供给To String对象,并将Defaut格式更改为时间戳格式。 祝你好运,比尔 以上来自于谷歌翻译 以下为原文 Hi Nick, I'll try to answer your questions... Instead of using File Name Selection, have your program open a blank excel file, fill it with data, then use the Save Workbook As to save it under a new file name. To change the output of now() feed it to a To String object and change Defaut Format to Time Stamp Format. Good luck, -Bill |
|
|
|
derek88 发表于 2018-10-15 11:31 谢谢回复! 我实际上已经解决了很多我遇到的问题,但我只是登录去询问其他人。 我会稍后开始另一个线程。 “不要使用文件名选择,让程序打开一个空白的excel文件,用数据填充它,然后使用Save Workbook As将其保存在新文件名下。” 我实际上需要将它保存在一个excel文件中。 每次测试运行时我需要的是一张新表。 我得到了这个“想通了”我现在唯一的问题就是新的表单被命名为“63564124664.266”,然后我必须通过转换才能在“3/28/2015 9:52:00 PM”中找到它 “格式。 “要更改now()的输出,请将其输入To To String对象,并将Defaut Format更改为时间戳格式。” 好的,我删除了从“now()”到“New Sheet”框的路径并添加了“To String”(I / O - > To - > String),双击添加一个事务,然后切换“ 默认格式“到”时间戳格式“但是当我运行程序时,它返回”错误号553“我附加了一个字母数字显示,它正确显示日期,它只是没有进入”新页面“对象。 谢谢尼克 以上来自于谷歌翻译 以下为原文 Thanks for the reply! I've actually worked through alot of the issues I was having but I was just logging on to ask some others. Ill start another thread for that later though. "Instead of using File Name Selection, have your program open a blank excel file, fill it with data, then use the Save Workbook As to save it under a new file name." I actually NEED to keep it saved in a single excel file. What I need is a new sheet every time the testing is run. Ive got this "figured out" my only problem now is the new sheets get named something like "63564124664.266" which I then have to run through a conversion in order to get it in a "3/28/2015 9:52:00 PM" format. "To change the output of now() feed it to a To String object and change Defaut Format to Time Stamp Format." Ok so I deleted the path from the "now()" to the "New Sheet" box and added in a "To String" (I/O -> To -> String), double clicked to add a transaction, then switched "DEFAULT FORMAT" to "TIME STAMP FORMAT" but when I run the program it comes back with "Error Number 553" I attached an alphanumeric display and it shows the date correctly, its just not going into the "NEW SHEET" object. Thanks Nick |
|
|
|
Nick,Excel不允许/或:作为工作表名称的一部分。 在To String对象中,关闭EOL(为了更好地测量),然后将其输出连接到System菜单中的String Replace对象。 根据需要选择新字符以替换/和:。 见附件。 将附件粘贴到程序后,只有在执行系统>字符串>替换后才能使用它。 这将迫使VEE加载到所需的.NET程序集中。 添加新的替换对象后,您可以立即将其删除。 顺便说一下,如果你加入VEE反射器,你会得到更快的回答如下:要订阅,请发送电子邮件至:“vrf-request@general.lists.agilent.com”,邮件正文中包含subscribe一词( 没有长签名和纯文本)。 要取消订阅,请发送一封空白电子邮件至“leave-vrf@general.lists.agilent.com”(仅限长签名和纯文本)。 要将邮件发送到此邮件列表,请发送电子邮件至“vrf@general.lists.agilent.com”。 问候, - 比尔 以上来自于谷歌翻译 以下为原文 Nick, Excel doesn't allow / or : as part of a worksheet name. In the To String object turn off EOL (for good measure) then connect it's output to a String Replace object from the System menu. Choose new characters as desired to replace the / and :. See attached. After you paste the attached into your program it won't work until you do System > String > Replace. That will force VEE to load in the requireed .NET Assembly. Immediately after adding the new replace object you can delete it. BTW, you'll get faster reponse to your questions if you join the VEE reflector as follows: To subscribe please send an email to: "vrf-request@general.lists.agilent.com" with the word subscribe in the message body (no long signatures and plain text only). To unsubscribe send a blank email to "leave-vrf@general.lists.agilent.com" (no long signatures and plain text only). To send messages to this mailing list, email "vrf@general.lists.agilent.com". Regards, -Bill 附件
|
|
|
|
derek88 发表于 2018-10-15 11:54 真棒,完美无缺! 我会在电子邮件列表中询问未来的问题。 谢谢! 缺口 以上来自于谷歌翻译 以下为原文 Awesome that worked perfectly! I'll ask future questions on the email list though. Thanks! Nick |
|
|
|
只有小组成员才能发言,加入小组>>
1287 浏览 0 评论
2375 浏览 1 评论
2194 浏览 1 评论
2064 浏览 5 评论
2951 浏览 3 评论
1111浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
753浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
926浏览 0评论
1287浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 09:33 , Processed in 1.714712 second(s), Total 81, Slave 65 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号