'/* Robert Paugh - DSPW - 10/22/25 */ '/* v0.1 */ '/* This Script is a work in progress. Use at your own risk! */ '/* Based off of Psycology Software Tools (PST) examples */ '/* Assumes that your RCB-W24x-LVDS device and the PST E-Prime PC are on the same network. */ '/* SendPostSetClr does both a Set and a Clear using Network Event number that is passed into the routine from a TaskEvent */ Sub SendPostSetClr(c As Context, ByVal myEvent As String) Dim http Set http = CreateObject("MSXML2.ServerXMLHTTP") '/* Send the Set message */ Dim url, dataSet url = "http://192.168.0.92:80" ' this is the IP address of your RCB-W24x-LVDS device. '/* In OE GUI , Events are 1-8 which are = to DSPW Events 0-7 */ '/* dataSet = "__SL P UDI,S6" */ 'force use of Event6 dataSet = "__SL P UDI,S" & myEvent http.Open "POST", url, False http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" http.Send dataset If http. Status <> 200 Then c.SetAttrib "PutError", CStr(htto.Status) Else c.SetAttrib "PutSuccess", "1" End If Dim http2 Set http2 = Createobject("MSXML2.ServerXMLHTTP") '/* Send the Clear message */ Dim url2, dataClear ur12 = "http://192.168.0.92:80" ' this is the IP address of your RCB-W24x-LVDS device. '/* dataClear = "__SL P UDI, C6" */ 'force use of Event6 dataClear = "__SL P UDI.C" & myEvent http2. Open "POST", url2, False http2.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" http2.Send dataClear If http2.Status <> 200 Then c.SetAttrib "PutError2", CStr(http2.Status) Else c.SetAttrib "PutSuccess2", "1" End If End Sub '/* not used in videao - Will send PUT message directly to the OE GUI HTTP Server. */ Sub SendPutRequest(c As Context) Dim http Set http = Create0bject ("MSXML2.XMLHTTP") Dim url, data url = "http://localhost:37497/api/status" '/* If OE GUI PC is running on PST E-Prime PC */ url = "http://192.168.0.150:37497/api/status". '/* If OE GUI PC is running on another PC */ data = "{""mode"":""ACQUIRE""}" '/* will start OE GUI Aquire Data */ http.Open "PUT", url, False http.setRequestHeader "Content-Type", "application/json" http.Send data If http. Status <> 200 Then c.SetAttrib "PutEror", CStr(http.Status) Else c.SetAttrib "PutSuccess", "1" End If End Sub