Hi, everyone,
How are you!
Below is the connection description for my test instrument.
How to setup the connection in the VEE? thanks a lot!
Initializing the Connection (Obtaining Authorization)
Before any commands will be accepted by the API web service, your application must first
open a connection to the application and retrieve the authorization token. This token is
dynamically created at each PIM Web Engine launch, and so must be captured dynamically
within your application in order to allow authorized commands to the PIM API web service.
Retrieve the token by sending an HTTP request (either GET or POST) to the following URL:
http://<controller>/api/connect/<Legacy?>
Regards,
Qi
Here's something to get you started. You'll need to find out the data format of the token and modify the READ transaction accordingly, but otherwise this part should be quite simple. Similar transactions for your commands.
########################################################
(saveFormat "7.0")
(date "Mon 15/Apr/2019 09:20:00 ")
(veerev "7.0.6310.0")
(platform "PC")
(execMode v6)
(filterNAN 0)
(workspaceStackingOrder M)
(SaveCF no)
(device 0 ROOTCONTEXT
(properties
(trigMode deg)
(nextID 1)
(popupTitleText "Untitled")
(popupMoveable 1))
(deviceList
(device 0 TOFROMSOCKET
(properties
(name "get token")
(transactions 2 "WRITE TEXT \"GET http://controller/api/<Legacy?>\" EOL"
"READ TEXT inst_token CHAR:1 ARRAY:10"))
(interface
(output 1
(name "inst_token")
(optional yes))
(output 2
(type exception)
(name "Error")
(lock name constraints)
(optional yes)))
(implementation
(attr iopath socket "connect" "instrument_ip" 80
(readTerm "\n")
(fs " ")
(eol "\n")
(multiField fullSyntax)
(arrayFormat block)
(timeout 10)
(byteOrder 0))))
(configuration))
(contextCarrier
(wndOrigin 2 2)
(wndState res)
(active detail)
(detail
(extent 1212 730)
(anchorPt 0 0)
(configuration
(devCarrierFor 0
(active open)
(icon
(extent 55 25))
(open
(extent 374 146))
(terminals on)
(pinCenter 290 190))))
(numberFormats
(realFormat standard)
(realSigDigits 4)
(realRadixSpec 4)
(integerBase decimal))))
########################################################