## Receiving data from V-REP in MATLAB

Typically: "How do I... ", "How can I... " questions
AHARR64
Posts: 12
Joined: 15 Nov 2018, 21:42

### Receiving data from V-REP in MATLAB

Hi,

I'm trying to get the values from a table in vrep and send them to matlab, but the signal doesnt receive any information, and the table always ends up blank. Perhaps i'm misunderstanding how the signals between matlab and vrep work. My code for V-REP is

Code: Select all

simRemoteApi.start(19999)
myTable = {1,2,3}
local E = sim.packInt32Table(myTable)
sim.setStringSignal("signal",E)
And my code in matlab is

Code: Select all

vrep.simxGetStringSignal(clientID,'signal',vrep.simx_opmode_streaming); %Tell V-REP to stream the data
[~,EValue]=vrep.simxGetStringSignal(clientID,'signal',vrep.simx_opmode_buffer);
E=vrep.simxUnpackInts(EValue);
The values of EValue and E are always empty arrays whenever I run the program. The program already connects to V-REP and gets the necessary data, so no connectivity problems otherwise.