Need Help! FOCAS pmc_rdpmcrng function in the c#


Results 1 to 2 of 2

Thread: FOCAS pmc_rdpmcrng function in the c#

  1. #1
    Member EmirC's Avatar
    Join Date
    Oct 2021
    Posts
    3
    Downloads
    0
    Uploads
    0

    Post FOCAS pmc_rdpmcrng function in the c#

    PMC_RDPMCRNG from within the Focas library | I want to pull this function using the ready-made function below, but I am getting an error in the byte part, can you help?



    public short sample(ushort start=3, ushort end=4)
    {
    short ret, idx;
    short adr_type, data_type;
    ushort length;

    adr_type = 2; // In case that kind of PMC address is G
    data_type = 0; // In case that type of PMC data is Byte
    length = (ushort)(8 + (end - start + 1));
    byte[] bytes = new byte[length];
    ret = Focas1.pmc_rdpmcrng(_handle, adr_type, data_type, start, end, length, bytes[1]);
    if (ret == Focas1.EW_OK)
    {
    for (idx = 0; idx <= end - start; idx++)
    {
    Console.WriteLine("#{0:d4} 0x{1:X2}", idx, bytes[8 + idx]);
    }
    }
    else
    {
    Console.WriteLine("ERROR!({0})", ret);
    }
    return (ret);
    }

    Similar Threads:
    Attached Thumbnails Attached Thumbnails FOCAS pmc_rdpmcrng function in the c#-pmc_rdpmcrng-png  


  2. #2
    Member alimutlu87's Avatar
    Join Date
    Jul 2023
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default Re: FOCAS pmc_rdpmcrng function in the c#

    Hello,
    Did you solve the problem?



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

FOCAS pmc_rdpmcrng function in the c#

FOCAS pmc_rdpmcrng function in the c#