Format DAT string using python

Hi, I’m trying to convert message from serial DAT, for example I have sound level meter on connected to COM port, and I’ve got constant messaging “N:086.5dB” etc., and I want to remove first two signs. So the question is; how to store input message in variable, and pipe it to output, and which block can I use for this? Execute DAT? text DAT? script DAT?

I would probably use the callback built into the callbacks DAT attached to your Serial DAT. In that callback, just create the table that you want in another tableDAT using Python. I’m a very Python oriented user, though.

If you want to convert every cell using nodes, you can wire the Serial DAT to an Evaluate DAT and in the Expression field, use some Python to alter the input. Example: me.inputCell.val[2:]

1 Like

Thank you :slight_smile: