Search found 375 matches

by mark bower
Jan 29, 2020 21:08
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

@fxm
I replaced the DISPLAYTIME code with yours. I ran the program 5 times:
1 - stopped @ counter =5
2 - stopped @ counter =6
3 - o.k.
4 - stopped @ counter =4
5 - stopped @ counter =34
by mark bower
Jan 29, 2020 20:50
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

I delayed getting back so I could run the code and give a clear idea what happens. Unfortunately it takes 6min to complete the shortest duration period, and then when I reboot Geany, it reverts to an earlier version and I goof and do not catch the change. For my program, "counter variable"...
by mark bower
Jan 29, 2020 19:20
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

No, the display and placements remain as they should - the time updates properly as the plot progresses. Not to confuse, but it does, with DISPLAYTIME remmed as below(sort of a discovery), the code can run to completion, BUT, sometimes it does not. And this looks like no use of Mutex. SUB DISPLAYTIM...
by mark bower
Jan 29, 2020 17:55
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

@fxm - here it is. When the program freezes, the current time also locks up. '======================================================================= 'SUB DISPLAYTIME (param As Any Ptr) '======================================================================= Dim Shared Mutex As Any Ptr Mutex = Mutex...
by mark bower
Jan 29, 2020 17:39
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

fxm - it's a bit ugly, but here it is: SUB INPUTSCREEN '======================================================================= 'Dim hThread As Any Ptr 'PER FB HELP, REMOVED FROM THIS LOCATION 'hThread = ThreadCreate(@DisplayTime,0) 'PER FB HELP, REMOVED FROM THIS LOCATION dim as string YN,a dim as ...
by mark bower
Jan 29, 2020 16:57
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

@paul I have code questions: 1) Why the counting in the SUB INPUTSCREEN; this sub is visited only once to make the start time & equipment plot parameters, 2) I do not understand where the "dim as boolean" & followng DO Loop" are inserted into my code, 3) the declare for STARTT...
by mark bower
Jan 29, 2020 5:21
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

Thanks for scaling down - I didn't get blown away! Late for me now, I will implement your code as I understand it tomorrow and be back.
mark
by mark bower
Jan 29, 2020 3:27
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

o.k., great, I am glad the problem is recognizable and I appreciate that you spent some time on the code. However, what you have provided back to me is very complicated from my perspective; again I am by no means what one would regard as an experienced programmer. All my past programming was only at...
by mark bower
Jan 29, 2020 0:26
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

In case it helps, let me give a "mental view" of what the code does. It takes input from A/D devices and plots a graph of input over time(data logging). In the bulk of the screen area is the x-y plot, but outside of that area in the upper left hand corner I display current time along with ...
by mark bower
Jan 28, 2020 1:12
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

Re: ON ERROR GOTO to display problem line

I do have mulithread in the program, but I honestly am not sure of its use in my program(I incorporated it with help from the Forum many years ago). And yes, I do use MultiKey in one of the called Subs in order to terminate the program before it times out as follows: "loop until MultiKey(FB.SC_...
by mark bower
Jan 28, 2020 0:21
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 63
Views: 6839

ON ERROR GOTO to display problem line

My datalog program plots voltage inputs from a multimeter. Sometimes the program will run to completion, but most of the time the program stops with the X-Y plot frozen. There is no definite time interval when it freezes; for a six minute program runtime, the plot can stop at .1 min or stop much lat...
by mark bower
Jan 24, 2020 2:04
Forum: Hardware Interfaces / Communication
Topic: Serial Read Write From PC USB to HP 34401A meter DB-9[Solved]
Replies: 18
Views: 7611

Re: Serial Read Write From PC USB to HP 34401A meter DB-9[Solved]

To wrap it up, just in case someone else with the HP34401A multimeter needs to communicate from USB to RS-232, the following is the key "open com" code line that worked for my equipment:

Code: Select all

open com "/dev/ttyUSB0:9600,e,7,2,rs,cd0,cs0,ds0" for input as #1
by mark bower
Jan 20, 2020 4:30
Forum: Hardware Interfaces / Communication
Topic: Serial Read Write From PC USB to HP 34401A meter DB-9[Solved]
Replies: 18
Views: 7611

Re: Serial Read Write From PC USB to HP 34401A meter DB-9[Solved]

@ badidea Thank you. Line Input vs Input works a treat. Early in the struggle I tried Line Input and it balked; it was the code suggested by the HP manual. But apparently there were many other problems involved. My code now uses Line Input. Bummer on .img insert, but your post shows the "beauty...
by mark bower
Jan 19, 2020 1:43
Forum: Hardware Interfaces / Communication
Topic: Serial Read Write From PC USB to HP 34401A meter DB-9[Solved]
Replies: 18
Views: 7611

Re: Serial Read Write From PC USB to HP 34401A multi-meter DB-9 [solved]

The code needed for communication for PC-USB to HP34401A multimeter RS-232 is solved. Below I present: 1) the code that works, 2) the result, 3) code provided in the HP manual that overly influenced my coding attempts. Since I have that code that works, I will not respond further to suggestions from...
by mark bower
Jan 17, 2020 15:33
Forum: Hardware Interfaces / Communication
Topic: Serial Read Write From PC USB to HP 34401A meter DB-9[Solved]
Replies: 18
Views: 7611

Re: Serial Read Write From PC USB to HP 34401A multi-meter DB-9

Joshy - thanks for interest. I will try and respond later today or tomorrow after trying a different bit format. For some reason I have been blocked from editing so I cannot change this post and will have to enter a new one. To repeat a bit, please do note, that: 1)I had no problems with the code wh...