Page 1 of 1

Receiving data from V-REP in MATLAB

Posted: 15 Jul 2019, 16:57
by AHARR64
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.

Thanks in advance,
Alan

Re: Receiving data from V-REP in MATLAB

Posted: 15 Jul 2019, 18:20
by AHARR64
EDIT: fixed by changing operationMode from buffer to blocking