juin 2013

Use of RASPI.DLL for RS232 data to Excel



Use of a known data source to do this test ...

Use of Vbray Terminal on COM1 :19200,8,1,N
and a script to send data to COM2
( physical link between COM1 & COM2 )

Vbray Script : Raspi_test.tsc

images/Raspi_Vbray_script.jpg


Chek if RSAPI.DLL is located in C:\Windows directoy .
Load Excel : RS232scope_2013.xls

On excel RS232_Scope sheet
FrameHeader is defined by #
Frame Tail by &
and we are waiting for 6 caracteres. ( # + 4 digits + &)


COM2 parameters are made on Configuration sheet
Choose the number of each parameter in the green line
images/Raspi_Config_sheet.jpg

To start communication , push START button on RS232_Scope sheet
and Push also, RUN on Vbray script window
Every 2 second , Vbray send
#1230&
the last digit is comming from the variable I , value from 0 to 9
transformed in chr by adding fixed value of 48.
So it gives a SAW signal on graphique.

images/Raspi_Rs232_Scope_sheet.jpg

On Rs232_Data sheet , the numeric value are also copied.

images/t_Raspi_Rs232_Data_sheet.jpg


PAY ATTENTION to Check (C) Copyright by yourself , before using RSAPI.DLL in your application
The VBA program must be adapted at what kind of data you want to get in serial flow. !
It's only an example to test the DLL.
Be carrefull, VBA is no so speedy !