SteveMyres

Members
  • Posts

    466
  • Joined

  • Last visited

Everything posted by SteveMyres

  1. Yeah, it doesn't start scanning till I tell it to earlier in the non-looping part of the sequence, and right before I start it, I purge(), so there "shouldn't" be anything queued up. Good thought about piled up packets though, hadn't considered that. And yeah, I'm still at the point of just getting it working to validate the device and feasibility for use with DF. If I deploy it, I'll do the code right.
  2. Have a weird situation. Here's the current stage of implementing the latest sensor (Ethernet, industrial style). It's scanning at 15Hz / 900rpm, so I expect a data packet every 66-67ms. I have a 20ms delay, the loop processing seems to take about 6-7ms, so I would assume it would loop the while(), then wait at the ReadUntil() for another 40ms till the next complete packet is in the buffer, then rinse and repeat. When the systime() is active, it seems that the loop is executing every 20-25ms or so, as if the ReadUntil() doesn't have to wait when it gets there. I've confirmed with Wireshark that I'm only getting a transmission every 65-70ms. I'm assuming the ReadUntil() removes the bytes from the buffer when the test is met. If so, how can the loop iterate faster than received data transmissions?? while(1) RawResp = device.Lidar.ReadUntil(3) RespStrArr = parse(RawResp, -1,",") DataCount = NumRows(RespStrArr)-18 DataStrArr = Prefix[18,DataCount] + RespStrArr[18,DataCount] Data= StrTodouble(DataStrArr)*Sines[0,DataCount] Delay(0.02) //?Data //?systime() endwhile
  3. I'm looking at using a lidar unit, which among other modes, once started, will stream multiple measurement in packets, with range and azimuth. How do I listen on the serial port for those packets? I can send command strings from either the device or port monitor dialogs and in some cases get replies, but the streaming responses don't show up.
  4. I want to check an email account for emailed production reports, then enter the data in a database. The email account that would be convenient for this is a typical ISP account requiring SSL, which I don't believe DAQ Factory supports. The emails are available through a web page as well, and I've been playing with HTTP.Get() to try to read the emails from there, but it doesn't seem that there's a URL API to log in, you have to do it via either saved password in the browser (I use Vivaldi), or type it into fields in the login page, neither of which I think will apply to DAQ Factory. I did manage to get a return from the server but it contained text complaining that I needed a browser that supports Javascript. Is there some simple known way to get email from a POP server that uses SSL but also has a webmail page?
  5. Hmm, that does seem like a lot better idea. Will definitely consider. Thanks!
  6. Yeah, that's what I would actually like to do (compare to the readback, which I actually poll anyway), but the sequence is in the UI, so I don't want to lock it for too long, and a major rewrite to make it a background task is bigger than I have time for. I'll probably just do a double write, trusting that that will catch 99% of the missed cases. Could do it in the UI quick sequence and do a system pump each iteration I guess.
  7. I have an application running where, probably due to Ethernet traffic levels, occasionally setpoint channel writes to a Modbus PLC are not completed on the first try. I'm setting the channel value in the UI object where the user inputs the setpoint. I often do user setpoint writes via a direct device call in the UI object where they make the setpoint, and in that case I might just repeat the write after a small delay. In this case, where I'm writing to a channel, if I write to the channel again with the same value, will it do the comms again or is the channel table aware enough to only do writes on an actual change in channel value? Also, I'm definitely open to any other ideas on diagnosing the problem or remediating it. Thanks!
  8. Suggest the following. These settings look closest to what the working settings are called in that note I directed you to. semail.strAuthenticate = "LoginPlain" semail.strConnectionType = "SSL_TLS" semail.strSSLProtocol = "SSLv2orv3"
  9. Or build an SMTP server. And yeah, I think you have to enable 2FA to get it working.
  10. Host created an FAQ that includes screenshots for the steps at https://hosteng.com/FAQFiles/Do-more.htm#FAQ0054 They did the FAQ earlier this week and were of course testing it as they went, so I know it still works.
  11. Yes, I'm using a GMail.Com address and that process is what I'm using with all my emailing PLCs, and they're all still working as of last night.
  12. It actually does, it's just more roundabout than before. You have to set up the GMail account to use 2 Factor authentication. Then, while logged into your account, you can get GMail to generate a new password to use with "less secure" devices (or software) that can only do username + password. I guess GMail assumes that if you're logged in using 2FA to generate the password, then the necessary enhanced security wonderfulness will rub off on that password. I do this with PLCs quite a bit, and there's a step by step instructions on how to set GMail up for this at ttps://forum.hosteng.com/index.php?topic=3163.0. Scroll all the way down to the bottom of the page.
  13. Quickest interim solution -- just added a VLOOKUP() to the Excel file, so the name is actually in the CSV verbatim.
  14. Right, I had used parens. Just typed from scratch and messed it up in the post. OK thanks for the explanation!
  15. I'm retrieving from a CSV file a 2D array where the fields are a mix of strings, numbers, booleans (encoded as "TRUE" and "FALSE") and one field containing a number that's a list index. So I'm displaying the array in a table where all the column definitions are MyArray[][FieldNumber], and they all work fine. The list index doesn't work. I tried the following expressions TypeList[ConfigurationArray[][10]] //and TypeList[StrToDouble[ConfigurationArray[][10]] but what I get instead is a list of TypeList[0..n], even though ConfigurationArray has all "5"s in the 10th column.
  16. It would be cool (my apologies if this already exists) to have compact syntax to directly extract a smaller size value from a variable/channel value without having to do an inline To.Bit() or whatever, and also to aggregate multiple consecutive values in an array as a larger type. For example, if MyVariable is 64-bit, MyVariable:UW0 might return the most/least significant 16 bits, interpreted as an unsigned word. MyVariable:37 might be the 37th least significant bit, and so on. As a delimiter, I'd suggest a period or a colon if available. If you had an array of smaller values, even if stored in 64-bit registers, you might be able to cast two consecutive ones into a single 64-bit value, interpreting each of the individual registers as 32-bit. This is probably less useful than the other application, in a DAQ Factory context, where all numbers are automatically stored as 64-bit.
  17. Has anyone used DAQ Factory to archive data logs that comply with CFR 21 Part 11? (FDA Electronic Data Records standards) How about compliance for the entire software system?
  18. Slick idea! Is there a way to tell a CTL version by direct inspection?
  19. Oh OK, thanks! Didn't realize the EXEs could share all the same support files. Well, to some degree, but didn't realize it would span across all releases. Cool. So I'd need to maintain a log of what customer was at what release, and I can see that getting out of date. Is there a way to tell directly from the CTL file what version it is so I don't inadvertently update it to a newer release?
  20. I have a bunch of customers in the field running DF applications I've done for them, and when they make changes or upgrades, I do the programming and create a new CTL for them. If I upgrade versions (and only maintain the latest version), then my editing the CTL forces them to update their DF runtime install version for compatibility. I guess I could maintain a copy of all older versions (presumably one per in virtual machines), and just do edits for customer X natively in the version that he has. Seems like it would be helpful if in the latest version I could do a Save As, say to v16 or whatever. Thanks!
  21. Originally, DF WAS a TCP server, but Wonderware for whatever reason was having trouble getting a response to the polled registers. Round 2: Installing a Modbus RTU (slave) to Modbus/TCP (server) gateway. I want DF to be the RTU master, so that I can control the frequency and timing of data transfer to the gateway. What I didn't realize is that outgoing (write) channels are ONLY event driven on a write (which most times is what you want). You can't enter timing and offset in the channel table, and there's no WriteGroup() equivalent to ReadGroup(). So my problem was that as I calculated the 20-25 values in sequence, each time I calculate one, DF is going to generate a one-channel write, which is not what I want. What I want is to write all 25 or whatever on a timed interval, analogous to the way reads are done. I ended up using option (2) above. Create a new array variable, execute MyArray.Append(CalcedVarNN) as I calculate the variables, then do a single write of the entire array from sequence on a time schedule.
  22. I have a channel group that contains a mixture of user-input values and values computed by DF with the user inputs and measured process values, about 20 channels total. This group is set up to be read by a remote Wonderware instance, and the channels have been set up as Modbus slave registers. I can [usually] read the channels but for some reason Wonderware has issues with it. If I set the channels up as writes (SetRegister) I find that I cannot set a timing nor offset. Typically writes are event-driven, so that's expected, but I'd like to write the group en-masse periodically. There doesn't exist a WriteGroup() analgous to ReadGroup(), and even if there were, I don't want the individual channels writing event-triggered as they're computed in script. Two approaches have occurred to me: (1) Disable the comm device before the computations (which are close together in script) and reenable when complete, but I doubt that the group would then automatically write, just from having been reenabled, or (2) leave the channels as Test Channels in the channel table, and create a new array variable. As the variables are calculated, append them to the array, then when complete, execute the write from script. Any other approaches that seem viable?
  23. Another curiosity. My remote access is via a Cisco Anyconnect VPN administered by the customer. Wireshark lists the Radmin VPN virtual adapter I use for remote access sites I manage, but does not seem to be aware of the Cisco one. If I could Wireshark the queries, I could see if there's any difference between the DF ones and the Modbus Poll or Baseblock ones.
  24. OK, so changing the port worked, partially. Can't imagine what could have been added to the DF PC using port 502, but changing to 510 allows both my DF test client and Modbus Poll to connect. However, DF polls successfully and Modbus Poll does not. It times out, even though both clients have generous timeout setting far longer than the typical response delay of 80ms. Baseblock ComTest Pro also times out and claims not to have received a response. DF and the other two clients have all worked in the past. I've been at this point before, as well as the case where all clients I used would work, when the plant SCADA guy could not get a response with Wonderware or Modbus Poll. I'm baffled.