Powerbuilder Serial Interface

Powerbuilder Serial Interface 7,2/10 3052votes

Hi, Extract the attached zip. Rename the file extensions as below, n_cst_serialcom.sru st_commtimeouts.srs st_dcb. Synergy Keygen Software there. srs st_overlapped.srs Import the above userobject and 3 structures to your library.

Powerbuilder Serial Interface

The above objects will help you communicate with serial port. You will need the following OCX -->MSCOMM32.OCX if its not present u need to copy it onto ur PC. Next u need to register it there. U can do the registering as follows. Go to Start--->Run in Run, browse and go to location of REGSVR32.EXE then add a space and give the location of ur MSCOMM32.OCX file it might look as follows. C: WINNT system32 REGSVR32.EXE C: MSCOMM32.OCX press OK and message of success will appear.

Now, from your PB object u can refer the above userobject and call its function like 'Read' and 'Write' Eg. N_cst_serialcom ln_cst_serialcom ln_cst_serialcom.Open(1) ln_cst_serialcom.Read(100) Hope this helps, Cheers, Rosh. Rosh, Thanks for the tips. It was helpful and appreciate it. MSCOMM32.OCX is registred The zip files are imported to my Library. Before Reading or Writing to the serial port, I have to open/close the tray of the machine connected to the serial port. For this the command need to pass to the serial port is CLS/OPN.

I tried with Hyper teminal and it is working fine. But when this command is passed from powerbuilder as ole_1.object.output= 'CLS' + char (26) nothing is happening Can you put some thoughts on this. Hi Rosh, I got those commands from the Micro Plate reader help desk. I am connecting this device to the serial port. The operational procedure is. The device is having a tray where your can place the plate reader. Once the tray is slid into the machine (using the close (CLS) command), the read (RED) commant will read the plate.

On giving the open (OPN) command the tray will come out and the plate can be removed. This can be done manually, (tried the operation with hyperterminal, it worked fine) but what I am trying to acheive is to get this done from the PB application we are having. I do have a window to accept the baud, parity etc and once the user selects these from the dropdown and click on a button 'Process', it will trigger a user event thru which I am trying to do this. Already defined the OCX control and the following code is there. -------------------------- ---------- ---------- ---------- ---------- ---------- ---------- --- ole_1.Object.CommPort = 1 ole_1.Object.Settings = '9600,N,8,1' //open the port ole_1.Object.InputLen = 0 ole_1.Object.InputMode = 0 If Not ole_1.object.portopen Then ole_1.object.portopen = TRUE End if ole_1.object.RThreshold = 10 ole_1.object.output = 'baud=9600 parity=N data=8 stop=1' ole_1.object.output= 'CLS' + char (26) -------------------------- ---------- ---------- -------- But it is not closing the tray which is the first step.

I tried the commands you asked me to try and was given an error - 'Error C0065: Invalid ~ hex character sequence in string' Hope you got the scenario. Appreciate your effort and the time you are taking to help me out.

2 www.topazsystems.com Back to Top SigPlus Software Developer Guide Table of Contents Version Changes.

Hi all, I have a cash drawer and and opener device connected to a USB port that is bridged to a COM16 serial port. According to the vendor I just need to send char(27)+char(53) down the serial port andit will open the cash drawer. They provide a MS Excel VBA sample which uses MScomm32.ocx and it works. But I have difficulties using that ocx file in PB 8. Is there someone here who can give me the required steps to implement and use that ocx in PB? Even better would be a code example. Someone suggested to create a window, do insert-->control-->OLE and select the MScomm32.ocx file.

So I did that and created a command button with the code to open the com port and send the string. But all I get is an error of something like 'invalid access of object property'. Image-Line Minihost Modular Beta 3. If someone could help me with this that would be great. Thanks for thinking about it. Hans ---== Posted via the PFCGuide Web Newsreader ==--- fisher 22.12.07.

Powerbuilder Serial Interface

Hi Roland, Thanks for responding. Unfortunately this doesn't work for me. I put the MSCOMM32.ocx into c: windows system32, put an OLE control on a window (insert-->control-->ole, created a command button and for that a script with the commands you suggested. But it comes back with 'invalid external function property for the first command. I did NOT declare any global functions. So the question is, did you and wich ones?

Regards Hans On 26 Dec 2007 08:27:18 -0800, in sybase.public.powerbuilder.ole-ocx-activex Hans 30.12.07. That is GREAT!!! Not sure what I did wrong when I tried it but it works!!! Only thing I can't do is read from the port. The connected device sends a status back wich is 'ESC + 60' if the drawer is open.

In order to read I did this (after opening the port of course): blob rsdata string data rsdata = ole_1.object.input data = string (rsdata) The program runs over the statements and does not give any error message but the variabe is empty. If you could help me also with this I would be infinitely grateful.

On 31 Dec 2007 05:24:10 -0800, in sybase.public.powerbuilder.ole-ocx-activex Roland Smith [TeamSybase] wrote: >Did you run regsvr32 on MSCOMM32.ocx? >>I did this from a new app specifically for trying this out. Here are my >steps: >>Open the New window and go to the 'PB Object' tab >Choose Standard Visual and click OK >Choose olecontrol and click OK >Switch to the Insert Control tab >Scroll down and select Microsoft Communications Control >Click OK >Save the object as u_mscomm32 >Place the object on a window with the control name ole_1 >>Roland Smith [TeamSybase] 3.1.08.