Modbus Flex Getter/can't connect

Hello guys, I've got problem with node Modbus Flex Getter. When I put nodes like this Inject->function->Modbus Flex Getter( node-red-contrib-modbus )->Modbus Response it just give me 2 errors

"SyntaxError: Unexpected token function"
"TypeError: Cannot read property 'registerForModbus' of null"

Is here someone who knows what's wrong with that? When I use nodes node-red-contrib-serial-modbus it works fine but for my project would be better Modbus Flex Getter.

Here's my flow
[{"id":"9ad7528f.e69fc","type":"tab","label":"SDM630 Modbus Gateway","disabled":false,"info":""},{"id":"368a8c76.362e94","type":"modbus-flex-getter","z":"9ad7528f.e69fc","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"a88606c6.70fc78","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":490,"y":100,"wires":[["5804250a.61e32c"],[]]},{"id":"4ebeb73b.a76818","type":"function","z":"9ad7528f.e69fc","name":"","func":"msg.payload = { value: msg.payload, 'fc': 3, 'unitid': 6, 'address': 0 , 'quantity': 10 };\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":100,"wires":[["368a8c76.362e94"]]},{"id":"92660fd5.11ab1","type":"inject","z":"9ad7528f.e69fc","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":100,"wires":[["4ebeb73b.a76818"]]},{"id":"5804250a.61e32c","type":"modbus-response","z":"9ad7528f.e69fc","name":"","registerShowMax":20,"x":690,"y":100,"wires":[]},{"id":"a88606c6.70fc78","type":"modbus-client","z":"","name":"","clienttype":"serial","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttySer1","serialType":"RTU","serialBaudrate":"19200","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"6","commandDelay":"1","clientTimeout":"1000","reconnectTimeout":"2000"}]

And also I'm not sure what exactly means Unit-id, I've got Energy meter as a slave, is that Energy meter's address??

Thanks for some ideas

I'm not able to test because I don't have serial slaves. Usually work with Modbus TCP.
But one of the things I've seen in this video was to remove the value property from the object.
But I'm not sure this would give a syntax error.

msg.payload = { 'fc': 3, 'unitid': 6, 'address': 0 , 'quantity': 10 };

The unitid property is important because that is the way Modbus master knows where to poll the data from. It should be the Modbus ID of your energy meter.

Hi, to write more registers use the FC16 function, the instrument id cannot be 0, it represents the instrument number on the modbus network, you detect it from the instrument itself, by default-factory for almost all the instrumentation is 1, also if you want to write on the network you must enter and configure the "server" node.