-
#725 Reply
Posted by
IanJ
on 15 Apr, 2024 20:02
-
Hey Ian,
I grabbed your updated version and installed it on the Beelink S12 Mini that I just bought specifically to run WinGPIB etc next to my kit and I'm still getting the issue with it not finding the DLL. The interesting thing is that I just dropped the DLL into the WinGPIB directory on my desktop machine and it works fine.
So I have, what appear to be, 2 identical installs on different machines and yet WinGPIB can find the DLL on one device and not the other.
Any ideas?
TonyG
Which .DLL.......could be one of two.....and where are you placing the file?
Ian.
-
#726 Reply
Posted by
Tony_G
on 15 Apr, 2024 21:45
-
Hey Ian,
I believe that it is still the Microchip DLL causing the problem.
To make sure, I just flattened the Beelink machine, reinstalled Win 11 Pro 23H2, installed NI 488.2 and VISA packages and then installed the new V3_161 package that you posted.
The app throws the same exception:
Log Name: Application
Source: .NET Runtime
Date: 4/15/2024 2:35:34 PM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: TG-BEELINK
Description:
Application: WinGPIB.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
at PDVS2_GPIB.Formtest..ctor()
Exception Info: System.InvalidOperationException
at PDVS2_GPIB.My.MyProject+MyForms.Create__Instance__[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon)
at PDVS2_GPIB.My.MyApplication.OnCreateMainForm()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
at PDVS2_GPIB.My.MyApplication.Main(System.String[])
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2024-04-15T21:35:34.3226693Z" />
<EventRecordID>2921</EventRecordID>
<Correlation />
<Execution ProcessID="13044" ThreadID="0" />
<Channel>Application</Channel>
<Computer>TG-BEELINK</Computer>
<Security />
</System>
<EventData>
<Data>Application: WinGPIB.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
at PDVS2_GPIB.Formtest..ctor()
Exception Info: System.InvalidOperationException
at PDVS2_GPIB.My.MyProject+MyForms.Create__Instance__[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon)
at PDVS2_GPIB.My.MyApplication.OnCreateMainForm()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
at PDVS2_GPIB.My.MyApplication.Main(System.String[])
</Data>
</EventData>
</Event>
I'm in the process of reinstalling VS so that I can put it under debugger to confirm the DLL it is looking for.
TonyG
-
#727 Reply
Posted by
Tony_G
on 15 Apr, 2024 22:40
-
Here is the exception from inside the VS Debugger:
System.InvalidOperationException
HResult=0x80131509
Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'MCP2221DLL-M-dotNet4.dll' or one of its dependencies. The specified module could not be found.
Source=WinGPIB
StackTrace:
at PDVS2_GPIB.My.MyProject.MyForms.Create__Instance__[T](T Instance) in PDVS2_GPIB.My\MyProject.cs:line 218
at PDVS2_GPIB.My.MyApplication.OnCreateMainForm() in PDVS2_GPIB.My\MyApplication.cs:line 39
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at PDVS2_GPIB.My.MyApplication.Main(String[] Args) in PDVS2_GPIB.My\MyApplication.cs:line 22
This exception was originally thrown at this call stack:
Inner Exception 1:
FileNotFoundException: Could not load file or assembly 'MCP2221DLL-M-dotNet4.dll' or one of its dependencies. The specified module could not be found.
You can see that it is looking for "MCP2221DLL-M-dotNet4.dll" and here is the directory listing:
C:\Program Files (x86)\IanJ\WinGPIB>DIR
Volume in drive C has no label.
Volume Serial Number is 2644-9FDF
Directory of C:\Program Files (x86)\IanJ\WinGPIB
04/15/2024 03:15 PM <DIR> .
04/15/2024 02:35 PM <DIR> ..
07/26/2023 11:24 AM 14,707 GPIBchannels.txt
04/25/2023 02:49 PM 60,416 IODevice.dll
05/21/2019 11:58 AM 0 Log.csv
06/17/2015 02:20 PM 84,992 MCP2221DLL-M-dotNet4.dll
02/04/2024 12:46 PM 63,303 PDVS2_GPIB.exe.config
02/14/2024 03:24 PM 788,480 WinGPIB.exe
01/02/2022 11:33 AM 27,198 WinGPIB.ico
7 File(s) 1,039,096 bytes
2 Dir(s) 423,794,827,264 bytes free
So the DLL should be in the search path for a Windows EXE - I'm a bit at a loss for why it fails on this machine but works on my desktop - I could provide Fusion logs but I don't think they're particularly helpful in this case (though I could be missing something)
I think the best way for me to try and debug is via building the solution on this machine - PM Sent for latest source.
TonyG
-
#728 Reply
Posted by
IanJ
on 16 Apr, 2024 06:58
-
Send me an email and I will reply with the source.
PS. I use a separate installer (not VS’s own) to build the .MSI, far easier and better than Microsoft’s effort.
Possible:
1. What .NET Framework version is loaded on the PC? WinGPIB is optimized for 4.X
2. OS version?
3. Environment Labels on PC somehow causing an issue.
4. Antivirus/Firewall.
5. I only have Keysight’s drivers loaded, no other.
Over the years there has been the odd random user who has had installation issues……have usually been able to track it down.
Ian
-
#729 Reply
Posted by
IanJ
on 16 Apr, 2024 20:25
-
Hi all,
Been playing with WInGPIB and my Rigol DHO914 Oscilloscope to see if it responds to GPIB commands, which it does.
Uncheck "Enable Polling", all rest as default.
Address = TCPIP::192.168.1.205::inst0::INSTR
Sending config/setup commands (SEND ASYNC):
:CHANnel1:DISPlay OFF Turn channel 1 off
:CHANnel1:DISPlay ON Turn channel 1 on
:CHANnel1:SCALe 0.1 Sets the vertical scale of Ch.1 to 0.1 V/div
:CHANnel1:COUPling AC Sets the coupling mode of Ch.1 to AC
Reading back data (QUERY ASYNC):
:MEASure:STATistic:ITEM? AVERages,VPP,CHANnel1 Queries the average value of Ch.1 peak to peak.
:TRIGger:STATus? Query the current trigger status, i.e. AUTO will be returned, albeit due to text var it will be displayed in box…….i’ll fix this at next WinGPIB update.
See the DHO800/DHO900 Programming Guide for much more.
Ian.
-
#730 Reply
Posted by
IanJ
on 17 Apr, 2024 10:36
-
New version in Post #1 available for download.
WinGPIB_V3_162_full.zip - Fresh install
WinGPIB_V3_162_updated_exe.zip - Updated exe to replace existing
[Virus scanned using BitDefender AntiVirus]
New checkbox added to allow text/non-numerical responses from the device.
This mode is generally for use with the QUERY ASYNC button and the checkbox status is not stored in the profiles as it's really only during testing/setup etc you might want to use such a mode.
In the example below I queried my DHO914 Oscilloscope to find out what mode the trigger was in, the response was "AUTO".
Ian.
-
#731 Reply
Posted by
Rax
on 18 Apr, 2024 23:52
-
I've been trying to install this and getting stuck at the same step every time (this usually takes place months apart). I run the msi and there's no prgram anywhere on the x86 or the other Program Files folder.
Also, I'm not sure what I need to do with the "Version 3.143 and over requires MCP2221DLL-M-dotNet4.zip which is available in the downloads if you are updating." There's a dll in that zip, and just stating "it's required" gives no indication where the dll needs to be dropped.
This is on a Windows 10 Pro system.
Thank you very much for assisting with this.
-
-
drop the dll in the same folder as wingpib once installed and see if it works ... see answer #727 ??
The MCP2221 is an USB/I2C bridge .... it must be the scope interface ?? i don't know theses models
some link talking of it and a setup who should install it ??
http://www.emar.cz/sw/USB-I2Cman.htm
-
#733 Reply
Posted by
IanJ
on 19 Apr, 2024 08:34
-
I've been trying to install this and getting stuck at the same step every time (this usually takes place months apart). I run the msi and there's no prgram anywhere on the x86 or the other Program Files folder.
Also, I'm not sure what I need to do with the "Version 3.143 and over requires MCP2221DLL-M-dotNet4.zip which is available in the downloads if you are updating." There's a dll in that zip, and just stating "it's required" gives no indication where the dll needs to be dropped.
This is on a Windows 10 Pro system.
Thank you very much for assisting with this.
There was a small mistake in POST #1 about the path where WinGPIB is installed. It should read:
C:\Program Files (x86)\IanJ\WinGPIB\
After installation a shortcut is copied to your desktop, but failing that you run WinGPIB.exe to start the app.
The MSI installs both the required .DLL files, you only need to manually place the DLL is you are updating an old WinGPIB installation manually, i.e.
Download MCP2221DLL-M-dotNet4.zip and unzip the .DLL from the file then place it in the WinGPIB installation folder, which is usually:
C:\Program Files (x86)\IanJ\WinGPIB\
or
C:\Program Files (x86)\WinGPIB\
.....depending on the age of the original version you are running.
If after full installation you have no such program folder then the install may have failed for you.......did you get an error message?
Ian.
-
#734 Reply
Posted by
IanJ
on 19 Apr, 2024 11:07
-
New version in Post #1 available for download.
WinGPIB_V3_163_full.zip WinGPIB_V3_164_full.zip - Fresh install
WinGPIB_V3_163_updated_exe.zip WinGPIB_V3_164_updated_exe.zip - Updated exe to replace existing
[Virus scanned using BitDefender AntiVirus]
Nothing new added, but a lot of bug fixes, tweaks and changes, as such I have left version 3.62 in Post #1.
PLAYBACK CHART:
- Now more reliably sets the X-scale when opening CSV's, it was buggy depending on data and single versus dual device running.
- There was a bug on the X-scale when opening CSV's which had been logged using a time base of less than 1sec.
DATA LOG/CSV:
- Now you must make your filename, Enable CSV status before hitting RUN on the main Device tab, this is because writing the MetaData for the CSV was unreliable if GPIB Device was already running.
- The Metadata now only appears at the start of the CSV.
- CSV Metadata is now 3 lines of text max only.
- Removed the Export CSV button temporarily for similar reason, doubt it was used much and it just got in the way of other code.
- Added various interlocks related to CSV file contents reset, Enable CSV checkbox etc.
Any issues with 3.164 then let me know here or via PM.
Can't believe I first started developing WinGPIB over 6 years ago!
Ian.
-
#735 Reply
Posted by
Rax
on 19 Apr, 2024 14:45
-
If after full installation you have no such program folder then the install may have failed for you.......did you get an error message?
Ian.
Ian,
I got it to work - thanks!
Now I'm trying to connect my instruments:
- Prema 6048 over GPIB (one of xyphro's USBGPIB, which currently works very well with a little custom py)
- HP 34401A over RS232 (which also works well with TestController)
I am not sure RS232 is really supported - this being a GPIB program - but I found some posts in this thread that seem to indicate it's possible.
The other potential difficulty is that when I setup the Python environment for GBPIB comms with the Prema, I used the R&S libraries, not Keysight's. Would that be a dealbreaker? I couldn't find any mentions in the thread regarding whether R&S libraries work.
-
#736 Reply
Posted by
IanJ
on 19 Apr, 2024 17:42
-
Rax,
In WinGPIB press the NOTEPAD GPIBchannels button and it will open a text document with lots of hints, tips & examples for using WinGPIB.
The idea is you can edit that text document with your own tips......but for a kick-off it's all stuff I have gleaned.
R&S is using VISA which is a generic standard adopted by many manufacturers, so you can use it.
You can of course also use RS232 if you want instead of VISA, there are examples in the text document for that.
Ian.
-
#737 Reply
Posted by
IanJ
on 20 Apr, 2024 10:31
-
New version in Post #1 available for download.
WinGPIB_V3_165_full.zip - Fresh install
WinGPIB_V3_165_updated_exe.zip - Updated exe to replace existing
[Virus scanned using BitDefender AntiVirus]
Fixed bug in PlayBack Chart, the X-Axis scale labels were displaying as integers rather than floating point numbers.
Have also lowered the minimum length CSV file to 40 lines (was 160).
Ian.
-
#738 Reply
Posted by
IanJ
on 20 Apr, 2024 13:40
-
New version in Post #1 available for download.
WinGPIB_V3_166_full.zip - Fresh install
WinGPIB_V3_166_updated_exe.zip - Updated exe to replace existing
[Virus scanned using BitDefender AntiVirus]
Small fix to the PlayBack Chart, the far right hand X-Scale label below the chart is sometimes missing.
I found a fix, but not entirely sure why the problem exists in the first place (thanks MS for the dodgy MS Chart system!).......so have left V3.165 in downloads for now....just incase.
Seems to work fine anyways.
Ian.
-
#739 Reply
Posted by
IanJ
on 20 Apr, 2024 17:38
-
New version in Post #1 available for download.
WinGPIB_V3_167_full.zip - Fresh install
WinGPIB_V3_167_updated_exe.zip - Updated exe to replace existing
[Virus scanned using BitDefender AntiVirus]
Small GUI fixes & cleanups on various tabs.
Add extra checks when loading the CSV file into the Playback Chart - check for empty lines and consistency of the data.
Ian.
-
#740 Reply
Posted by
Tony_G
on 20 Apr, 2024 19:56
-
Hey Ian,
I found the issue so I thought I'd share it just in case this ever comes up again.
The MCP2221 Assembly has a dependency itself on the VC++ 2010 Runtime - No idea why the exception wasn't showing the redist file(s) instead of the MCP DLL but installing the VC++ 2010 Redist solved the issue and WinGPIB now runs on that machine.
Thanks for a great app.
TonyG
-
-
-
#742 Reply
Posted by
IanJ
on 20 Apr, 2024 20:36
-
Hey Ian,
I found the issue so I thought I'd share it just in case this ever comes up again.
The MCP2221 Assembly has a dependency itself on the VC++ 2010 Runtime - No idea why the exception wasn't showing the redist file(s) instead of the MCP DLL but installing the VC++ 2010 Redist solved the issue and WinGPIB now runs on that machine.
Thanks for a great app.
TonyG
Thanks, I’ll put it in the installation notes in post #1 for future reference.
Ian
-
#743 Reply
Posted by
IanJ
on 21 Apr, 2024 09:28
-
New version in Post #1 available for download.
WinGPIB_V3_168_full.zip - Fresh install
WinGPIB_V3_168_updated_exe.zip - Updated exe to replace existing
[Virus scanned using BitDefender AntiVirus]
Bug fix on Device 2, an issue with the Max. No. DP's fixed. Thanks to AHOL for reporting this.
Also, I have updated the installation notes in Post #1 with some info regarding the MCP2221DLL-M-dotNet4 DLL that is installed with WinGPIB for the MCP2221A/SHT40,41,45 temp sensor functionality. Depending on your Windows installation you may need to install an update to allow WinGPIB to work. Thanks to Tony_G for finding this one.
Ian.
-
#744 Reply
Posted by
IanJ
on 21 Apr, 2024 12:48
-
New version in Post #1 available for download.
WinGPIB_V3_169_full.zip - Fresh install
WinGPIB_V3_169_updated_exe.zip - Updated exe to replace existing
[Virus scanned using BitDefender AntiVirus]
Need help installing, upgrading or moving to a new PC, then see instructions in Post #1
Just a tidy up of the Playback Chart VB code......no real changes.....it was a bit of a mess in terms of readability. Hmmm, it still is....but it's a bit better now.
Ian.
-
#745 Reply
Posted by
IanJ
on 21 Apr, 2024 16:50
-
New version in Post #1 available for download.
WinGPIB_V3_170_full.zip - Fresh install
WinGPIB_V3_170_updated_exe.zip - Updated exe to replace existing
[Virus scanned using BitDefender AntiVirus]
Need help installing, upgrading or moving to a new PC, then see instructions in Post #1
Further tidy up:
Desktop shortcut gets a proper icon graphic.
Windows Control Panel Add/Remove Programs entry gets a proper icon graphic.
Completely fresh installs (no existing WinGPIBdata folder) gets the latest GPIBchannels.txt file.
PS. Next on my agenda is to allow the installation .msi file to be able to upgrade an existing installation without having to remove the existing one or to manually replace the .exe, nor will overwrite the data folder.
Ian.
-
#746 Reply
Posted by
Tony_G
on 22 Apr, 2024 15:37
-
Yay - Windows Defender deletion for "Trojan:Win32/Wacatac.B!ml"
TonyG
-
#747 Reply
Posted by
IanJ
on 22 Apr, 2024 15:45
-
Yay - Windows Defender deletion for "Trojan:Win32/Wacatac.B!ml"
TonyG
I'll report it......Must be about the 5th false positive in all these years.
Ian.
-
#748 Reply
Posted by
IanJ
on 22 Apr, 2024 15:59
-
New version in Post #1 available for download.
WinGPIB_V3_171.zip
[Virus scanned using BitDefender AntiVirus]
Need help installing, upgrading or moving to a new PC, then see instructions in Post #1
One .msi installer file now allows fresh installations or upgrades. No need to manually copy the .exe now.
When upgrading it will not overwrite the files in your data folder, C:\Users\[username]\Documents\WinGPIBdata
Ian.
-
#749 Reply
Posted by
IanJ
on 23 Apr, 2024 02:19
-
Yay - Windows Defender deletion for "Trojan:Win32/Wacatac.B!ml"
TonyG
As thought, confirmed as a false positive. Microsoft’s response in full below:
wingpib.exe
Submission ID: aa5bd3c2-2236-4994-ac11-1ab33389e026
Status: Completed
Submitted: Apr 22, 2024 17:07:53
User Opinion: Incorrect detection
Analyst comments:
At this time, the submitted files do not meet our criteria for malware or potentially unwanted applications. The detection has been removed.
Please follow the steps below to clear cached detections and obtain the latest malware definitions.
1. Open command prompt as administrator and change directory to c:\Program Files\Windows Defender
2. Run “MpCmdRun.exe -removedefinitions -dynamicsignatures”
3. Run "MpCmdRun.exe -SignatureUpdate"
Alternatively, the latest definition is available for download here:
https://docs.microsoft.com/microsoft-365/security/defender-endpoint/manage-updates-baselines-microsoft-de