When weighing a car on autoweight (Tara, Gross), the data gets into 1C 8.3. How can I display the value for weighing and screenshots from four IP cameras to a web page?

    2 answers 2

    As an option - on the side of 1C to organize the http-service, to which the web page will be knocked. Accordingly, 1C will give data on the image and weight.

      A primitive example, complicate your realities:

      Страница = Новый ТекстовыйДокумент; Страница.ДобавитьСтрока("<html>"); Страница.ДобавитьСтрока("<body>"); Страница.ДобавитьСтрока("Результаты взвешивания:"); //твой код с запросом к камере 1 Результат = HTTPСоединение.Получить(ТвойHTTPЗапрос1); ПутьКФайлу1 = КаталогВременныхФайлов() +"какое-то имя.jpg"; ДД = Результат.ПолучитьТелоКакДвоичныеДанные(); ФОтка = ПоместитьВоВременноеХранилище(ДД); ДД.Записать(ПутьКФайлу1); //Повторяешь для каждой из камер, получаешь 4 файла картинки. //Не обязательно писать во временный каталог, решай где тебе удобно хранить. Страница.ДобавитьСтрока("<img src="ПутьКФайлу1" alt=""+ ПолученыйРанееВес +"" />"); //выводишь по аналогии еще 3 фото Страница.ДобавитьСтрока("</body>"); Страница.ДобавитьСтрока("/<html>"); Страница.Записать("C:\index.html"); 
      • Thanks for the answer. and how to organize this is not on the side of 1C? for example, the 1C server is on the network at 10.0.0.3 and the web server is on a different IP? - Maxim
      • It depends on who will be the initiator. If the web server, then the appeal to the http-service, as suggested by Pavel, 1c will return the image and weight, and the output is realized on the side of the web server. If the initiator should be 1s, offhand a couple of options: the same service on the server side, where you need to knock, passing the same JSON. Kostyolno, but it will work: any buffer (file, database), where 1c will read the current information and read the web. depending on what is needed by the task - the code will help - Vladislav