I would like to import data from the registers of an evaluation board to an excel spreadsheet via Visual Basic and the SS scripting language. I'm not an experienced VB user and would appreciate a tutorial or steps to accomplish this.
After pounding through Visual Basic and the SS server command structure, I have to assume that the connection between the two applications doesn't work, even though Visual Studio accepts the SigmaStudioServer as a reference for the project. I keep getting a "Object Reference not set to an instance of an object" error.
I have a simple setup with a ADAU1452 eval board. The project has a read back block connected to an envelope detector which is attached to an input. The VB module is trying to read that register block and write the value to the console.
This is the module: Public Function Read_data(dataread) dataread = ss.REGISTER_READ("ReadBack1", 20, 4) Return dataread End Function
It builds fine, but hangs on execution because any attempt to interact with the sigmastudioserver returns a null character. I tried different methods from the server functions, and they all fail.
Does anyone have experience with this?
Have you tried changing this:
dataread = ss.REGISTER_READ("ReadBack1", 20, 4)
dataread = ss.PARAMETER_READ("IC 1", XX, 8, 24)
Where "XX" is the parameter address (in decimal) for the ReadBack1 output. To determine this address, click the "Read" button in the ReadBack1 cell, and note the address that appears in the capture tab for the read request. Then, convert that address to decimal.
In the above example, 8 and 24 correspond to the 8.24 fixed-point decimal format of the output.
I appreciate your reply.
Unfortunately any of the SS server functions give in the same error when VB tries to execute that line of code.
Do I have to initialize something to use the functions?
It looks like you are initializing correctly. Try putting a space in "IC 1" (the way it's displayed in the tab in SigmaStudio).
Sorry, tried that, same result.
Retrieving data ...