Need some help from a VB expert


+ Reply to Thread
Results 1 to 11 of 11

Thread: Need some help from a VB expert23 days old

  1. #1
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,165
    Thumbs Up
    Received: 96
    Given: 1
    Total Downloaded
    2.75 GB

    0 Not allowed!

    Default Need some help from a VB expert

    I have just downloaded Visual Studio 2019 in order to try and modify the PPS Tool app for PDS.
    It's a long, long time since I dabbled in the VB world and it has changed dramatically.
    I tried to do a build but it threw up errors because it was trying to save to the original authors path.
    The error is being thrown in the Microsoft.common.CurrentVersion.Targets which is an XML document.
    It seems to be an xml snippet associate with PostBuildEvent
    The line concerned is:
    Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)"
    and I am guessing WorkingDirectory must be a parameter holding the author's path.
    I don't know my way around this VB IDE so can someone suggest where I might find this setting. .
    Last edited by johngb; 15th November 2019 at 17:28.
    JohnB

Attention

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #2
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,425
    Thumbs Up
    Received: 296
    Given: 141
    Total Downloaded
    1.68 GB

    0 Not allowed!

    Default Re: Need some help from a VB expert

    I could'nt find the source for that tool John. Where did you find it?

    Visual BASIC is, IMO, a dreadful language because it is so bloated and they extended it so much it became virtually unreadable and unfollowable with all the uses of the Windows APIs and DLLs etc... Why not try one of the VB to Delphi converters.

    In Delphi, as you know, it is a good structured language that has some querks with all the begin/ends required, but it makes code very small and fast.

    Here's a VB to Delphi converter you can try:

    https://www.planet-source-code.com/v...xtCodeId=47654
    Last edited by top204; 15th November 2019 at 19:29.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #3
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,165
    Thumbs Up
    Received: 96
    Given: 1
    Total Downloaded
    2.75 GB

    0 Not allowed!

    Default Re: Need some help from a VB expert

    I'll give it a go. I agree it is horrendously complicated. I have managed to get the app working now and made the changes to make it support PDS syntax.
    Question, is it necessary to configure TX and RX port direction, I seem to remember the compiler does all that?

    If the tool works I think I will move it to Delphi
    JohnB

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #4
    Prolific Poster johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,165
    Thumbs Up
    Received: 96
    Given: 1
    Total Downloaded
    2.75 GB

    0 Not allowed!

    Default Re: Need some help from a VB expert

    Just has a quick look, the code was written in 2003 before .net. I don't think it has a chance in hell to manage that conversion.
    JohnB

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #5
    Senior Member Stephen Moss's Avatar
    Join Date
    Jan 2006
    Posts
    510
    Thumbs Up
    Received: 31
    Given: 7
    Total Downloaded
    3.72 GB

    0 Not allowed!

    Default Re: Need some help from a VB expert

    Hi John,
    I don't think you have to specify RX and TX direction is it handled by the read/write commands. I don't know how much help this well be but this this a serial setup for Arduino communication (sends about 40 bytes to PC on a timer roughly every 200mS) so might give you idea of how to configure it...
    Code:
      '===== Configure Com Port ===== OK 15/03/20 (Called from From1 Load event)
        Public Sub Configure_ComPorts()
    
            Try
                'Clear ComPort Listbox
                Form1.ComPort_ComboBox.Items.Clear()  'Belt & Braces as should be clear anyway
    
                'Populate Comport Combobox with active comports
                For Each sp As String In My.Computer.Ports.SerialPortNames
                    Form1.ComPort_ComboBox.Items.Add(sp)
                Next
    
                'Set Defualt comport - NOTE COM1 is usually PC internal so default is to last Comport found
                If Form1.ComPort_ComboBox.Items.Count > 1 Then
                    Form1.ComPort_ComboBox.SelectedIndex = (Form1.ComPort_ComboBox.Items.Count - 1)     'Display Name of Last Comport Found
                Else
                    Form1.ComPort_ComboBox.Text = Form1.ComPort_ComboBox.Items.Item(0)                  'Display Name of only Comport Found
                End If
    
                'Configure Comport with Arduino compatible settings 
                    Form1.SerialPort1.PortName = Form1.ComPort_ComboBox.SelectedItem    'Set Comport to Open - Default last Active ComPort in list
                    Form1.SerialPort1.BaudRate = 19200                                  'Set Baud Rate
                    Form1.SerialPort1.DataBits = 8                                      'Set Number of Fata Bits
                    Form1.SerialPort1.Parity = IO.Ports.Parity.None                     'Set Parity used
                    Form1.SerialPort1.StopBits = IO.Ports.StopBits.One                  'Set Stop bits used
                    Form1.SerialPort1.Handshake = IO.Ports.Handshake.None               'Set Handshaking used
                    Form1.SerialPort1.Encoding = Text.Encoding.Default                  'Set text encoding used
                    Form1.SerialPort1.ReadTimeout = 10000                               'Set Timeout in Milliseconds - 10 seconds recommended            
                    Form1.SerialPort1.NewLine = vbCr                                    'Set Newline identifier - Arduino specified
                    Form1.SerialPort1.ReceivedBytesThreshold = 38                       'Set minimum number of Bytes to recieve before Recieved Event is Triggered - 38 in minimum that should be sent
                    Tx_Data = "e"                                                       'Set default Tx data value to the stop value in case sent before full control established 
                End If
    
            Catch ex As Exception
                If Serial_Errors < 3 Then
                    MsgBox(ex.Message, Title:="Configure Com Ports Error")    'Display error Message
                    Serial_Errors = Serial_Errors + 1
                End If
    
            End Try
    
        End Sub
    To read data from the port my code is
    Code:
     Thread.Sleep(4)                     'Wait to ensure all data is recieved
    Rx_Data = SerialPort1.ReadLine
    Which is running in a background worker (multi-threading), you do not need to do that. For my code the read is triggered by the RecievedBytesThreshold in the initial setup above and can be handled as you see fit within
    Code:
        '=== Serial Port Data Recieved Interrupt Handler === OK 25/06/2018
        Private Sub Serial_Data_Recieved() Handles SerialPort1.DataReceived
    
        End Sub
    which is automatically called (like an interrupt) one the receive threshold is met. In my case it starts the the data parsing background worker although use of the RecievedBytesThreshold may not be applicable the PPS application.
    To send data to the serial port my code is
    Code:
    SerialPort1.Write(Tx_Data)
    This may not be the best serial code but was written last year so should be compatible with the current version of VB.

    As for the other issue I am not sure how you would solve that, VB tries to update to the current version but I think code written pre 2003 is to far removed for it to cope.
    You could try a find (entire solution) to see what makes use of/setting for the "Working Directory", "Command", "OutDir" and "PostBuildEvent" as that may give a clue as to what it is for and thus how to re-write it to be compatible with VB2019.

    From this is looks like it may be trying to start and pass commands to the command prompt which you may be able to do with something like
    Code:
    Process.Start("someApp.exe", "arg1 arg2")
    .
    you could also just try setting the Working directory to a known folder, i.e
    Code:
    WorkingDirectory = CurDir     'Set to the current (project) directory) or the now preferred
    WorkingDirectory =  My.Computer.FileSystem.CurrentDirectory = "Drive:\FolderName"

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #6
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,231
    Thumbs Up
    Received: 75
    Given: 181
    Total Downloaded
    5.15 GB

    0 Not allowed!

    Default Re: Need some help from a VB expert

    Just has a quick look, the code was written in 2003 before .net. I don't think it has a chance in hell to manage that conversion.
    From a position of blissful ignorance I would have thought the added complication of .net could only make the task easier.
    George.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #7
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    487
    Thumbs Up
    Received: 59
    Given: 0
    Total Downloaded
    330.54 MB

    0 Not allowed!

    Default Re: Need some help from a VB expert

    I think JohnB was asking about having to set RX/TX port pin directions for the PIC uart... nothing to do with the VB code per say.

    From what I recall the PPS Tool code generator doesn't set any directions (except for a patch for the K42???)

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #8
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,425
    Thumbs Up
    Received: 296
    Given: 141
    Total Downloaded
    1.68 GB

    0 Not allowed!

    Default Re: Need some help from a VB expert

    Sorry for the delay in replying John, but my PC is now only lasting a few hours before overheating and dying on me, so I'm busy saving up for one.

    The 8-bit Proton compiler sets the PPS automatically for the devices that have PPS when the commands that use the peripherals are issued in a BASIC listing. I'm busy working on the same for Proton24, but because of all the devices supported it is a logistical task. However, Proton24 has the built in PPS_Inpt and PPS_Output commands, and your excellent IDE plugin.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #9
    Junior Member keytapper's Avatar
    Join Date
    Jun 2019
    Posts
    91
    Thumbs Up
    Received: 3
    Given: 3
    Total Downloaded
    308.02 MB

    1 Not allowed!

    Default Re: Need some help from a VB expert

    Quote Originally Posted by top204 View Post
    before overheating and dying on me
    You need to clean the cooling system. Whoever will do it, will have to stop your computer. If it's made by you, then you may save time and money. In case of laptop the issue is rather laborious, many screw and hooks to disengage (depending the making and model).

    Remembering the PPI, I had a bad time when I started with proton. I was trying to configure a 12F675 for internal clock, the statement was incorrect but the compilation was flawless. The result was that was writing the data protection and any verification was failing. In result of that I bought two programmers without resolving.
    I recall it was something around version 3.4.x.x . So I invite to keep an eye about the configuration bits.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #10
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,425
    Thumbs Up
    Received: 296
    Given: 141
    Total Downloaded
    1.68 GB

    1 Not allowed!

    Default Re: Need some help from a VB expert

    It's not the fan or the cooling system on the PC, it is the CPU starting to die, or the motherboard has a problem and is causing the CPU to overheat. The OS is also crashing intermittently because there is an issue somewhere on the motherboard. I place ice packs over the motherboard and it helps it stay alive a bit longer. It is about 10 years old and has been used, virtually, every hour of the day for most of those years. :-)

    The config fuses for a microcontroller is not something the compiler can cantrol or even monitor for correctlness because each PIC family has a differerent set of fuses. The compiler will give an error message from the assembler if a fuse name is not found, but it cannot control the way they are set up. Sometimes, it is up to the user to learn and understand what the microcontroller they are using requires, which is reading the datasheet.

    I tried with the Amicus board setup to start using a single, powerful, device that the compiler had full control of because it knew virtually everythihng about that single device, but a lot of PIC users seem to be obsessed with "lets use the latest device" LOL. Yet Arduino users are using an 8-bit microcontroller that is about 10 years out of date!

    I'm busy adding the dsPIC33CK devices to Proton24 and develop a board that uses them with a micro USB socket for bootloading, but funding is a problem for now. The dsPIC33CK devices work at 200MHz, so operate at 100 MIPs (Million Instructions per Second), which is extremely fast and they have a few 10s of K bytes or RAM, as well as the hardware multiply and divide and barrel shifting, and DSP operations. They also have a fast 12-bit ADC and a 12-bit DAC on board, so operations on them are extremely fast and very simple to use with Proton24. I have created a new SID chip player on one that actually reads a .SID file and emulates a 6502 microprocessor running on a Commodore 64 computer, and there is so much time left on the processor to do other things, it is crazy! I've also created a Ray casting 3D maze on a graphic LCD that operates so fast I had to add delays to slow it down. Maybe I'll create a game machine so users can program there own games on it, and I mean real games!

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #11
    Prolific Poster normnet's Avatar
    Join Date
    Jul 2004
    Posts
    2,367
    Thumbs Up
    Received: 78
    Given: 45
    Total Downloaded
    1.39 GB

    0 Not allowed!

    Default Re: Need some help from a VB expert

    Quote Originally Posted by top204 View Post
    ...I'm busy adding the dsPIC33CK devices to Proton24 and develop a board that uses them with a micro USB socket for bootloading, but funding is a problem for now. The dsPIC33CK devices work at 200MHz, so operate at 100 MIPs (Million Instructions per Second), which is extremely fast and they have a few 10s of K bytes or RAM, as well as the hardware multiply and divide and barrel shifting, and DSP operations. They also have a fast 12-bit ADC and a 12-bit DAC on board, so operations on them are extremely fast and very simple to use with Proton24. I have created a new SID chip player on one that actually reads a .SID file and emulates a 6502 microprocessor running on a Commodore 64 computer, and there is so much time left on the processor to do other things, it is crazy! I've also created a Ray casting 3D maze on a graphic LCD that operates so fast I had to add delays to slow it down. Maybe I'll create a game machine so users can program there own games on it, and I mean real games!
    Sounds cool!

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. Piezo expert pls?
      By pic-ignorant in forum The Lounge
      Replies: 12
      Last Post: 23rd January 2010, 01:46
    2. [SOLVED !] Need a VB6 expert
      By bruce in forum Proton Plus Compiler v3
      Replies: 3
      Last Post: 23rd July 2008, 15:31
    3. PCB tracking expert wanted
      By Tim in forum The Lounge
      Replies: 6
      Last Post: 11th April 2008, 23:12
    4. Wanted Expert in Motor Control
      By Tim in forum Wanted and For Sale
      Replies: 18
      Last Post: 12th October 2006, 00:52
    5. [SOLVED !] Wanted: PIC Expert near Kent
      By Chris. Terrell in forum Wanted and For Sale
      Replies: 0
      Last Post: 6th February 2006, 12:01

    Members who have read this thread since 3rd December 2019, 06:42 : 0

    Actions :  (Set Date)  (Clear Date)

    You do not have permission to view the list of names.

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts