All Activity

This stream auto-updates     

  1. Today
  2. AzeoTech

    Date time component

    OK, are you sure it is 32 bit? Doesn't matter, but seems excessive since each value is well below the 16 bit limit. Anyhow, you'll have to create a global variable that contains the start time and one for the end time. Then have the user interface elements edit those variables. You'll need a button to trigger some script that updates the schedule times in the PLC. That script could be done in a number of ways, but probably the easiest is to use formatDateTime() [see section 4.12.11 of user's guide] to get the date/time number into a comma delimited string: private string x = formatDateTime("%Y,%m,%d,%H,%M,%S", starttimevariable) then use parse() on that string to get each value: private out = parse(x, -1, ",") which will return an array of those 6 values which you can then send to your Modbus device.
  3. Yesterday
  4. Last week
  5. Zerout23

    Date time component

    I also forgot to mention that another register is used to enable the schedule so i would like to set a toggle switch of some sort to: 1. toggle enable or disable (00 or 01) 2. When enabled it will send the schedule command to set all registers like 01 2019 11 06 22 30 00 2019 11 08 09 00 00 (i.e. schedule set from Nov 6, 19 10:30pm to Nov 8, 19 9am)
  6. Zerout23

    Date time component

    Yes each would be different registers(unsigned 32 bit). So for start it would be the first 6 registers and the end would be another 6 registers.
  7. AzeoTech

    Date time component

    In 6 different registers?
  8. Zerout23

    Date time component

    The expected format is year, month, day, hour(24), min, sec. Example: 2019 11 06 22 30 00
  9. AzeoTech

    Date time component

    Well, the trick is first determining what format your device expects the date and time. You definitely can't just tell it January 15th 2020. It won't understand that, and Modbus doesn't support sending that sort of information anyway. Usually date and time is stored internally in computers as some sort of number referenced to an epoch. For example, DAQFactory stores date/time information as seconds since Jan 1, 1970 (standard Unix time format), while Excel uses decimal days since 1900. These are very different, as today we are at about 1.57 billion seconds since 1970, but only about 44,000 days since 1900. Anyhow, you'll need to find what your device expects then I can describe how to get there.
  10. Zerout23

    Date time component

    Hello so i am completely new to Daqfactory and even newer to programming so forgive me if i don't use the right terminology. I have a serial device that uses the modbus protocol. I want to create an interface where a user enters a start date and time to schedule a routine using the date time component. In order to do this on my device i need to set multiple registers (i.e. start date, start time, end date, end time) so how can i go about setting multiple registers using the date time component? Appreciate the help and feedback. Thank you.
  11. Earlier
  12. AzeoTech

    Emotron floating point format & Modbus

    I'm afraid it would take a bit of experimentation so you are on your own. But yes, if the value is less than or equal to 32767 you can just treat it as an integer and use it as is. If it is > 32767 then you have to do the conversion.
  13. jaresing

    Sending a parentheses in a ddp

    Got it, my error was the hyphen instead of the comma out = format(" Set_rack(%d,%d)",variable,variable2) 
  14. I am trying to send this command over a serial channel using a ddp protocol Set_rack(variable1,variable2) This command requires (), and I cant figure out how to write the serial port For the command "position=variable,variable2" I would go function position(variable,variable2) private string out purge() out = format("position=%d-%d",variable,variable2) write(out + chr(13)) What do I do for the parentheses? Thanks
  15. I am developing a HMI interface where there will be two or three HMIs talking to the PLC. The problem I have is I can't seem to fully initialise the knob components. If the PLC is running the line and the HMI is powered up I need it to pick up the comveyor speeds and initialise the speed adjustment knobs without affecting the PLC. When I fire up the HMI it does seem to initialse OK when looking at the variables in the watch window. However when I switch to the page with the knobs on it resets to zero and writes it to the PLC. Can you advise how I can solve this please? I've included a screen shot of the initial page and the variables in the watch window and everything is stable. I've then also included a screen shot of what happens when I switch to the page with the knobs on. knob_initialisation.zip
  16. That makes sense. Many thanks.
  17. Can you post a sample of what you have so I can see what might be wrong?
  18. Neither. It is accessible from script. But since it is inside the group, you have to reference the group as well: component.groupname.componentname.memberVariable This way, if you duplicate the group, or make it into a user component, you can give each copy of the group a different name and not have to rename all the enclosed components.
  19. Hi, I've found that when a component is part of a group the component name becomes invisible to references in my sequences. Is this a bug or just something I need to live with? Thanks Colin
  20. Using simply myChannel =1 as a Quick Sequence #1 and myChannel =0 as Quick sequence #2 I was not implement this in version 18.1 must be missing something. Any help appreciated.
  21. AzeoTech

    2018 Update?

    It is just a variable you set: page.scaling = 0.5 for example will scale the page at 1/2 size. You can use the page.screenwidth and page.screenHeight variables to automatically calculate and update the scale from a sequence.
  22. SveinB

    2018 Update?

    How does this page scaling work?
  23. cjbassman2

    Initializing Knob component

    I am developing a HMI interface where there will be two or three HMIs talking to the PLC. The problem I have is I can't seem to fully initialise the knob components. If the PLC is running the line and the HMI is powered up I need it to pick up the comveyor speeds and initialise the speed adjustment knobs without affecting the PLC. When I fire up the HMI it does seem to initialse OK when looking at the variables in the watch window. However when I switch to the page with the knobs on it resets to zero and writes it to the PLC. Can you advise how I can solve this please? I've included a screen shot of the initial page and the variables in the watch window and everything is stable. I've then also included a screen shot of what happens when I switch to the page with the knobs on. knob_initialisation.zip
  24. AnttiB

    Emotron floating point format & Modbus

    Thank you for the info. I was wondering that could you make me an example script to start the experimenting. Channel name = shaft_power Device type = Tamu1 D# = 1 Channel = 1004 I need the read the channel in standard 16 bit format and when I hit the 32767 (111111111111111) value I need to start the calculating after that. Is this correct?
  25. AzeoTech

    Emotron floating point format & Modbus

    OK, that is a new, and quite proprietary way of dealing with floating points. I don't know why they just didn't do what everyone else does and use two registers and regular IEEE floating point format.... You have to take the U16 value you get from the PLC and process it like they are floating point values in this weird format. You can tell if they are floating point because the value returned will be > 32767. There is not a simple Conversion you can apply. You would have to use script. I'd probably either use the to.bit function to get the bits and then calculate it, or use some bitwise math to extract the proper values. The tricky part is the sign, which is not in a usual place because the breaks aren't at 8 bit intervals. You will likely need to experiment.
  26. Hello, I have been running Emotron VFD trough modbus with DAQFactory. All the basic reading and writing is working just fine. Now I´m having a problem converting Emotron floating point format to correct decimal values. I can read the value from 0 to 32767 with the U16 format but after that I don´t know how to continue reading the value. I need to read this value from 0 to 200000. Can I make this work trough "channels" ? Part of the Emotron manual attached. emotron.pdf
  27. AzeoTech

    Justifying variables

    It shouldn't change the Z order. But it will make the components opaque.
  28. If you are opening a database but never closing it, you will leak memory. It will be a pretty slow leak, but after a week could use up all available memory. Windows responds to complete loss of memory in weird ways, and a bluescreen is not unheard of. Personally I don't close my databases. I open them at startup and just leave them open while DAQFactory is running. DAQFactory will close it automatically when it shuts down. File handles often have to be closed to force Windows to clear the write cache, or to allow other applications write access to the file, but databases do not have this issue. If you are seeing that the database appears to not be updating in another program while DAQFactory is working with it, it may be that the database is transactional and you need to perform a commit on the database. The SQL command for this varies on the database, but for, say, Firebird, the command is just "Commit".
  29. AzeoTech

    UDP Communication

    We had some issues with reliability in some cases so dropped UDP support. The code is, however, still in there. We just removed the button to allow you to add a new UDP connection. So, you should be able to create a document in the older version with a UDP connection, then bring it forward to the new release and the port will still be there. If your document is complex, we might be able to do this for you without you having to recreate your document. Just email us the doc. You would, however, need to be on the latest release.
  1. Load more activity