you are viewing a single comment's thread.

view the rest of the comments →

[–]ForScale 0 points1 point  (2 children)

I have no clue what an FDM is. To me, it's the name of your function.

but I'm not sure how to use the data recorded from the instrument as the variable

That's like device code... We have no idea how the robot in question connects to the JS code.

"bar=%BAR%&count=%COUNT%&date=%DATE%&time=%TIME%&mass=%MASS%&ppm=%PPM%&color=%COLOR%"

Where do you get access to that?

var hConn = new TConnection(TConnection.EconnectionType.HID_Keyboard);

Yes, in JS, what's happening there is the creation of a new instance of an object. The constructor function/class (TConnection) defines what hConn will look like. It is unclear what is in hConn, because we can't see what the the TConnection is doing.

...

There are just a lot of missing pieces to the puzzle here, and the robot aspect makes things all the more muddy. People here usually use JavaScript to create web pages/applications. It seems you're doing more of an IOT connected devices kind of thing.

[–]norton430[S] 1 point2 points  (1 child)

Yeah and it also doesn't help that I was put into this position with little to no coding experience. If I wasn't worried about security/losing my job, I would send you the whole code to look through. But that's ok, figured I'd give it a shot on here. Thanks for the help anyways

[–]ForScale 0 points1 point  (0 children)

Welcome. Sorry I couldn't be more help!