Forum Replies Created
-
AuthorPosts
-
November 21, 2025 at 4:08 am in reply to: How do I find the location of HTBasic installation from within a program? #9593
Thank you, Pat.
I’ll ask if we an find funding to upgrade. It makes sense to me, but money is a bit tight and we have three copies to maintain!
Thank you for being so helpful with my queries. Much appreciates.Peter
November 14, 2025 at 6:01 am in reply to: How do I find the location of HTBasic installation from within a program? #9591Thank you, Pat.
That solves the problem! The COMMAND$ keyword is new to me – and I see it is new-ish to HTBasic.
(I came to HT Basic from HP Basic running on the Basic Language Processor card – a co-processor which plugged into ISA slot on the earliest IBM PCs!)
Interestingly, double-clicking the .prg file works fine to launch my program on HTB 10.13 but not on HTB 10.03. I think this is a known issue but I am not sure which versions will launch a progran from a double click on the .prg file. I haven’t yet found anything in the HTB version history which documents which versions work and which do not when you double click the .prg.
Thank you again,
Peter
An update!
I do now have the com0com virtual serial port working!
On we go!
Peter
Hello again, Mark.
Thank you for your advice. I apologise for the delay in replying.
I agree with you that the quickest way is to use the analog data from the analyser – everything is already set up to do that and it works well. The shortcoming is that the limited analyser DA precision means that we can see digital steps in the analog data. These are at the level of resolution we want to achieve in our measurements. When we look at the modbus data (not in HTB) we do not see these. A simple low-pass filter is of limited value when the noise on the signal is not continuously varying. When we look at the higher precision of the digital signal available through modbus then we can resolve changes in analyser readings at the level we require wihout seeing the digital steps.I have spent many hours trying to get at the modbus communications through HTB with, so far, limited success. I have generated a modbus request string which I believe is read by the slave device but I have yet to receive a reply from it. Progress is limited by not being able to get HTB to load a virtual com port so I can’t get HTB to talk to a modbus slave simulator to see exactly what is going on.
I think my next post should be to look for help with virtual com ports – (I have com0com installed) – perhaps someone knows of one which HTB will be happy to talk to.
Thanks once again.
Peter
ABB Easiline EL3020.
I am working from the documentation here
It has analog and modbus output, Mark, but the analog output is more noisy than the modbus output, presumably due to lower prescision the the D to A converter. A colleague has been able to log modbus data (using Matlab, I think) for comparison.
I am progressing a little with the extraction of data from a 32-bit dummy string in IEEE574 format.
Along the way I have been rather surprised to find that IVAL does not work with long integers!Thank you for your interest. It is helpful to be able to chat about this.
Peter
Thank you, Mark, for your prompt reply. Most helpful. I do have a little modbus A-D RTU card and an RS485 card for the PC on which to test the actual modbus protocol, but Modsim looks to be worth a try and may well get me going rather quicker.
Meanwhile, let me disclose a particular issue here.
The ABB gas analyser from which I want to log data returns IEEE754 32bit data over modbus.
I am struggling to find an elegant way of converting the 32 bits, received as 4 bytes, to decimal.
I would appreciate any advice on this particular challenge!The analyser is a replacement for just one of a number of analog instruments which we read using the HP/Agilent/Keysone Data Acquisition & Switch Unit 34970A with HPIB communication, so it would be very handy to solve this within the HP/HTBasic code which has run our system since 1989.
Thak you once again.
Peter
A follow-up to Rob’s post – I tried the HTBFileopen DLL from the 2021 demo with HTB version 10 and it seemed to work there, with just the same characteristics as that originally packaged with version 10. Hence I doubt if the dll has changed during the upgrade from 10 to 2021.
I hope this helps.
Thank you, Henrikhuse, for a most helpful reply to my post.
You have clarified what Parameter 3 and Parameter 5 should do.
In practice, they are not working quite as I expected.To re-cap my post, I would like to have a file open dialog which allows multiple file selection (which Fileopen.dll does with style=512), and where I can set a mask so only the selected extensions are shown in the file list.
With Fileopen.dll, what I expect to see, when I open the file open dialog (based on the comprehensive documentation in your post) is that all file extensions are masked out except those permitted by Parameter 3 or selected from the option(s) in the extension list box set by parameter 5. In practice, neither Parameter 3 nor 5 seem to influence the list of selectable files. (The Parameter 5 list box seems ineffective and is greyed out, perhaps because it only contains one item. I have not been able work out a format for Parameter 5 to display a list of extensions in the box from which to select.) It may simpply be that, as I don’t know any C, I am not using the correct syntax for these parameters – in which case advice would be much appreciated!
What I find is that I can only mask down the file list to show the preferred extension by passing *.extension as parameter 4.
I also find that I can only set one filename in parameter 4 (Style 512 does not influence Parameter 4) and so I can not mask the file list to show files with either of two defined extensions, which would be a rather useful option.
I can use the Fileopen dll in my application – it is still better than the Widget alternative in that it supports multiple file selection – but it would be much more elegant if I could gain more control of the extension masking in the file list.
Thank you again for your help, and thanks to to all who replied earler to this post.
Thank yyou for suggesting the FILE WIDGET and DIALOG.
I’ve tested these again – it’s a few years since I did so.There seem to be two shortomings with these in my application, if I have understood them correctly.
1. I can’t find a way to select multiple files so I can initiate a batch process.
As I see it, I would have to select and load files one at a time before commencing the batch process.
HTBFileopen.dll does allow multiple selections and simply concatenates them into the string which it returns.
2. I haven’t been able to find a way to customise the contents of the file type selection box.If either or both of these can be achieved then this would indeed be a rather nicer solution than the dll.
Thank you again.
-
AuthorPosts